Rev | Line | |
---|
[10004] | 1 | /*! |
---|
| 2 | * @file swarm_projectile.h |
---|
[10618] | 3 | * @brief a Swarm_Missile Projectile |
---|
[10004] | 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _SWARM_PROJECTILE_H |
---|
| 7 | #define _SWARM_PROJECTILE_H |
---|
| 8 | |
---|
| 9 | #include "projectile.h" |
---|
| 10 | |
---|
| 11 | class Weapon; |
---|
| 12 | class SpriteParticles; |
---|
| 13 | class ParticleEmitter; |
---|
| 14 | class FastFactory; |
---|
| 15 | class Aim; |
---|
[10081] | 16 | class Trail; |
---|
[10004] | 17 | |
---|
| 18 | class SwarmProjectile : public Projectile |
---|
| 19 | { |
---|
| 20 | ObjectListDeclaration(SwarmProjectile); |
---|
| 21 | public: |
---|
| 22 | SwarmProjectile (); |
---|
| 23 | virtual ~SwarmProjectile (); |
---|
| 24 | |
---|
| 25 | virtual void activate(); |
---|
| 26 | virtual void deactivate(); |
---|
| 27 | |
---|
[10261] | 28 | virtual void hit (WorldEntity* entity, float damage); |
---|
[10004] | 29 | |
---|
| 30 | virtual void destroy (WorldEntity* killer); |
---|
| 31 | |
---|
| 32 | virtual void tick (float time); |
---|
| 33 | virtual void draw () const; |
---|
| 34 | |
---|
[10080] | 35 | void setTarget(PNode* target); |
---|
[10004] | 36 | |
---|
| 37 | private: |
---|
| 38 | static FastFactory* fastFactory; |
---|
| 39 | static SpriteParticles* explosionParticles; |
---|
| 40 | |
---|
[10081] | 41 | Trail* trail; |
---|
[10618] | 42 | Trail* smoke; |
---|
[10081] | 43 | |
---|
[10004] | 44 | ParticleEmitter* emitter; |
---|
| 45 | float agility; |
---|
[10618] | 46 | const static float maxVelocity = 100; |
---|
[10004] | 47 | float speed; |
---|
| 48 | Vector diffVector ; |
---|
| 49 | Vector correctionVector; |
---|
| 50 | |
---|
[10087] | 51 | Vector curDir; |
---|
| 52 | Vector lastDir; |
---|
[10132] | 53 | Vector oldPos; |
---|
[10087] | 54 | |
---|
[10004] | 55 | WorldEntity* hitEntity; // FIXME TEMPORARY |
---|
| 56 | |
---|
[10035] | 57 | Vector newDirection(Vector curDirection, Vector estTargetDir, float angle); |
---|
| 58 | |
---|
[10037] | 59 | // spinning missle |
---|
[10618] | 60 | const static float rotationSpeed = 360; |
---|
[10037] | 61 | float angle; |
---|
[10004] | 62 | }; |
---|
| 63 | |
---|
| 64 | #endif /* _SWARM_PROJECTILE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.