Changeset 4890 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons/projectile.h
- Timestamp:
- Jul 19, 2005, 12:20:58 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/projectile.h
r4836 r4890 1 1 /*! 2 \ projectile.h2 \file projectile.h 3 3 * a projectile, that is been shooted by a weapon 4 4 … … 26 26 class Vector; 27 27 class Weapon; 28 class ParticleEmitter; 28 29 29 30 class Projectile : public WorldEntity 30 31 { 31 friend class World; 32 public: 33 Projectile (Weapon* weapon); 34 virtual ~Projectile (); 32 35 33 public:34 Projectile (Weapon* weapon);35 virtual ~Projectile ();36 void setFlightDirection(Quaternion flightDirection); 37 void setVelocity(const Vector &velocity); 38 void setLifeSpan(float lifeSpan); 36 39 37 void setFlightDirection(Quaternion flightDirection);38 void setSpeed(float speed);39 void setVelocity(const Vector &velocity);40 void setTTL(float ttl);41 40 42 virtual void hit (WorldEntity* weapon, Vector* loc);43 virtual void destroy ();44 41 45 virtual void tick (float time);46 virtual void draw ();47 42 48 protected: 49 //physical attriutes like: force, speed, acceleration etc. 50 float speed; //!< this is the speed of the projectile 51 float currentLifeTime; //!< this is the time, the projectile exists in this world (incremented by tick) 52 float ttl; //!< time to life, after this time, the projectile will garbage collect itself 53 Vector* flightDirection; //!< direction in which the shoot flights 54 Weapon* weapon; //!< weapon the shoot belongs to 43 virtual void destroy (); 55 44 56 Vector velocity; //!< velocity of the projectile 57 Vector offsetVel; //!< offset velocity TEMP 45 virtual void tick (float time); 46 virtual void draw (); 47 48 protected: 49 50 // energy 51 float energyMin; 52 float energyMax; 53 54 55 float lifeCycle; //!< The percentage of the Lifetime done [0-1] 56 float lifeSpan; //!< The entire lifespan of the Shoot. 57 58 Vector flightDirection; //!< direction in which the shoot flighs 59 Weapon* weapon; //!< weapon the shoot belongs to. 60 61 Vector velocity; //!< velocity of the projectile. 62 63 ParticleEmitter* emitter; //!< For special effects each Projectile consists of an emitter. 58 64 }; 59 65
Note: See TracChangeset
for help on using the changeset viewer.