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