Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/projectile.h @ 3708

Last change on this file since 3708 was 3708, checked in by patrick, 19 years ago

orxonox/trunk: added testbullet class. some changes in the weapon class to make it look much better and also more performant

File size: 1.1 KB
Line 
1/*!
2    \projectile.h
3    \brief a projectile, that is been shooted by a weapon
4*/
5
6#ifndef _PROJECTILE_H
7#define _PROJECTILE_H
8
9#include "world_entity.h"
10
11class Vector;
12class Weapon;
13
14class Projectile : public WorldEntity
15{
16  friend class World;
17
18 public:
19  Projectile (Weapon* weapon);
20  virtual ~Projectile ();
21
22  void setFlightDirection(Quaternion flightDirection);
23  void setSpeed(float speed);
24  void setTTL(float ttl);
25
26  virtual void hit (WorldEntity* weapon, Vector* loc);
27  virtual void destroy ();
28
29  virtual void tick (float time);
30  virtual void draw ();
31
32 private:
33  //physical attriutes like: force, speed, acceleration etc.
34  float speed;                         //!< this is the speed of the projectile
35  float currentLifeTime;               //!< this is the time, the projectile exists in this world (incremented by tick)
36  float ttl;                           //!< time to life, after this time, the projectile will garbage collect itself
37  Vector* flightDirection;             //!< direction in which the shoot flights
38  Weapon* weapon;                      //!< weapon the shoot belongs to
39 
40};
41
42#endif /* _PROJECTILE_H */
Note: See TracBrowser for help on using the repository browser.