Last change
on this file since 3658 was
3646,
checked in by patrick, 20 years ago
|
orxonox/trunk: implemented garbage collector, is not yet collecting, i have to update the list.h first.
|
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 | |
---|
11 | class Primitive; |
---|
12 | class Vector; |
---|
13 | |
---|
14 | class Projectile : public WorldEntity |
---|
15 | { |
---|
16 | friend class World; |
---|
17 | |
---|
18 | public: |
---|
19 | Projectile (); |
---|
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 | Primitive* projectileModel; //!< this serves temporary as a plasma bullet |
---|
35 | float speed; //!< this is the speed of the projectile |
---|
36 | float currentLifeTime; //!< this is the time, the projectile exists in this world (incremented by tick) |
---|
37 | float ttl; //!< time to life, after this time, the projectile will garbage collect itself |
---|
38 | Vector* flightDirection; //!< direction in which the shoot flights |
---|
39 | |
---|
40 | }; |
---|
41 | |
---|
42 | #endif /* _PROJECTILE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.