Last change
on this file since 10632 was
10618,
checked in by bknecht, 18 years ago
|
merged cleanup into trunk (only improvements)
|
File size:
1.6 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file swarm_projectile.h |
---|
3 | * @brief a Swarm_Missile Projectile |
---|
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; |
---|
16 | class Trail; |
---|
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 | |
---|
28 | virtual void hit (WorldEntity* entity, float damage); |
---|
29 | |
---|
30 | virtual void destroy (WorldEntity* killer); |
---|
31 | |
---|
32 | virtual void tick (float time); |
---|
33 | virtual void draw () const; |
---|
34 | |
---|
35 | void setTarget(PNode* target); |
---|
36 | |
---|
37 | private: |
---|
38 | static FastFactory* fastFactory; |
---|
39 | static SpriteParticles* explosionParticles; |
---|
40 | |
---|
41 | Trail* trail; |
---|
42 | Trail* smoke; |
---|
43 | |
---|
44 | ParticleEmitter* emitter; |
---|
45 | float agility; |
---|
46 | const static float maxVelocity = 100; |
---|
47 | float speed; |
---|
48 | Vector diffVector ; |
---|
49 | Vector correctionVector; |
---|
50 | |
---|
51 | Vector curDir; |
---|
52 | Vector lastDir; |
---|
53 | Vector oldPos; |
---|
54 | |
---|
55 | WorldEntity* hitEntity; // FIXME TEMPORARY |
---|
56 | |
---|
57 | Vector newDirection(Vector curDirection, Vector estTargetDir, float angle); |
---|
58 | |
---|
59 | // spinning missle |
---|
60 | const static float rotationSpeed = 360; |
---|
61 | float angle; |
---|
62 | }; |
---|
63 | |
---|
64 | #endif /* _SWARM_PROJECTILE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.