1 | |
---|
2 | /*! |
---|
3 | * @file turbine_hover.h |
---|
4 | * Implements the Control of a TurbineHover |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _TURBINE_HOVER_H |
---|
8 | #define _TURBINE_HOVER_H |
---|
9 | |
---|
10 | #include "playable.h" |
---|
11 | |
---|
12 | // Forward Declaration |
---|
13 | class ParticleEmitter; |
---|
14 | class ParticleSystem; |
---|
15 | |
---|
16 | class TurbineHover : public Playable |
---|
17 | { |
---|
18 | public: |
---|
19 | |
---|
20 | TurbineHover(const char* fileName); |
---|
21 | TurbineHover(const TiXmlElement* root = NULL); |
---|
22 | virtual ~TurbineHover(); |
---|
23 | |
---|
24 | virtual void loadParams(const TiXmlElement* root); |
---|
25 | |
---|
26 | virtual void enter(); |
---|
27 | virtual void leave(); |
---|
28 | |
---|
29 | virtual void postSpawn(); |
---|
30 | virtual void leftWorld(); |
---|
31 | |
---|
32 | virtual void collidesWith(WorldEntity* entity, const Vector& location); |
---|
33 | virtual void tick(float dt); |
---|
34 | virtual void draw() const; |
---|
35 | |
---|
36 | virtual void process(const Event &event); |
---|
37 | |
---|
38 | private: |
---|
39 | void init(); |
---|
40 | void movement(float dt); |
---|
41 | |
---|
42 | private: |
---|
43 | bool bForward; //!< forward button pressed. |
---|
44 | bool bBackward; //!< backward button pressed. |
---|
45 | bool bLeft; //!< left button pressed. |
---|
46 | bool bRight; //!< right button pressed. |
---|
47 | bool bAscend; //!< ascend button pressed. |
---|
48 | bool bDescend; //!< descend button presses. |
---|
49 | |
---|
50 | int yInvert; |
---|
51 | float mouseSensitivity; //!< the mouse sensitivity |
---|
52 | |
---|
53 | PNode wingNodeLeft; |
---|
54 | PNode wingNodeRight; |
---|
55 | PNode rotorNodeLeft; |
---|
56 | PNode rotorNodeRight; |
---|
57 | |
---|
58 | PNode cameraNode; |
---|
59 | float cameraLook; |
---|
60 | float rotation; |
---|
61 | |
---|
62 | Vector velocity; //!< the velocity of the TurbineHover. |
---|
63 | Quaternion direction; //!< the direction of the TurbineHover. |
---|
64 | float travelSpeed; //!< the current speed of the Hove (to make soft movement) |
---|
65 | float acceleration; //!< the acceleration of the TurbineHover. |
---|
66 | float airFriction; //!< AirFriction. |
---|
67 | |
---|
68 | float rotorSpeed; //!< the speed of the rotor. |
---|
69 | float rotorCycle; //!< The Cycle the rotor is in. |
---|
70 | |
---|
71 | float airViscosity; |
---|
72 | |
---|
73 | ParticleEmitter* burstEmitter[2]; |
---|
74 | ParticleSystem* burstSystem; |
---|
75 | }; |
---|
76 | |
---|
77 | #endif /* _TURBINE_HOVERS_H */ |
---|