Last change
on this file since 10063 was
10037,
checked in by nicolasc, 18 years ago
|
added some comments
made swarm missile spin
|
File size:
1.5 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file swarm_projectile.h |
---|
3 | * @brief a SwarmProjectile 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 | |
---|
17 | class SwarmProjectile : public Projectile |
---|
18 | { |
---|
19 | ObjectListDeclaration(SwarmProjectile); |
---|
20 | public: |
---|
21 | SwarmProjectile (); |
---|
22 | virtual ~SwarmProjectile (); |
---|
23 | |
---|
24 | virtual void activate(); |
---|
25 | virtual void deactivate(); |
---|
26 | |
---|
27 | virtual void collidesWith(WorldEntity* entity, const Vector& location); |
---|
28 | |
---|
29 | virtual void destroy (WorldEntity* killer); |
---|
30 | |
---|
31 | virtual void tick (float time); |
---|
32 | virtual void draw () const; |
---|
33 | |
---|
34 | |
---|
35 | private: |
---|
36 | static FastFactory* fastFactory; |
---|
37 | static SpriteParticles* trailParticles; |
---|
38 | static SpriteParticles* explosionParticles; |
---|
39 | |
---|
40 | ParticleEmitter* emitter; |
---|
41 | float agility; |
---|
42 | float maxVelocity; |
---|
43 | float speed; |
---|
44 | Vector diffVector ; |
---|
45 | Vector correctionVector; |
---|
46 | |
---|
47 | PNode* target; |
---|
48 | |
---|
49 | WorldEntity* hitEntity; // FIXME TEMPORARY |
---|
50 | |
---|
51 | Vector newDirection(Vector curDirection, Vector estTargetDir, float angle); |
---|
52 | |
---|
53 | // spinning missle |
---|
54 | void updateAngle(float time); |
---|
55 | float rotationSpeed; |
---|
56 | float angle; |
---|
57 | }; |
---|
58 | |
---|
59 | #endif /* _SWARM_PROJECTILE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.