[5996] | 1 | |
---|
| 2 | /*! |
---|
[6002] | 3 | * @file helicopter.h |
---|
| 4 | * Implements the Control of a Helicopter |
---|
[5996] | 5 | */ |
---|
| 6 | |
---|
[6002] | 7 | #ifndef _HELICOPTER_H |
---|
| 8 | #define _HELICOPTER_H |
---|
[5996] | 9 | |
---|
| 10 | #include "playable.h" |
---|
| 11 | |
---|
| 12 | |
---|
[6002] | 13 | class Helicopter : public Playable |
---|
[5996] | 14 | { |
---|
| 15 | |
---|
| 16 | public: |
---|
| 17 | |
---|
[6002] | 18 | Helicopter(); |
---|
| 19 | Helicopter(const char* fileName); |
---|
| 20 | Helicopter(const TiXmlElement* root); |
---|
| 21 | virtual ~Helicopter(); |
---|
[5996] | 22 | |
---|
| 23 | void init(); |
---|
| 24 | void loadParams(const TiXmlElement* root); |
---|
| 25 | |
---|
[6222] | 26 | virtual void enter(); |
---|
| 27 | virtual void leave(); |
---|
| 28 | |
---|
[5996] | 29 | void addWeapon(Weapon* weapon ); |
---|
| 30 | void removeWeapon(Weapon* weapon); |
---|
| 31 | |
---|
| 32 | virtual void postSpawn(); |
---|
| 33 | virtual void leftWorld(); |
---|
| 34 | |
---|
| 35 | virtual void collidesWith(WorldEntity* entity, const Vector& location); |
---|
| 36 | virtual void tick(float time); |
---|
[6005] | 37 | virtual void draw() const; |
---|
[5996] | 38 | |
---|
| 39 | virtual void process(const Event &event); |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | private: |
---|
| 44 | void calculateVelocity(float time); |
---|
| 45 | void weaponAction(); |
---|
| 46 | |
---|
| 47 | // !! temporary !! |
---|
| 48 | void ADDWEAPON(); |
---|
| 49 | |
---|
| 50 | bool bUp; //!< up button pressed. |
---|
| 51 | bool bDown; //!< down button pressed. |
---|
| 52 | bool bLeft; //!< left button pressed. |
---|
| 53 | bool bRight; //!< right button pressed. |
---|
| 54 | bool bAscend; //!< ascend button pressed. |
---|
| 55 | bool bDescend; //!< descend button presses. |
---|
| 56 | bool bFire; //!< fire button pressed. |
---|
| 57 | bool bRollL; //!< rolling button pressed (left) |
---|
| 58 | bool bRollR; //!< rolling button pressed (right) |
---|
| 59 | |
---|
| 60 | float xMouse; //!< mouse moved in x-Direction |
---|
| 61 | float yMouse; //!< mouse moved in y-Direction |
---|
| 62 | float mouseSensitivity; //!< the mouse sensitivity |
---|
| 63 | float cycle; //!< hovercycle |
---|
| 64 | |
---|
| 65 | Vector velocity; //!< the velocity of the player. |
---|
| 66 | Vector velocityDir; //!< the direction of the velocity of the spaceship |
---|
| 67 | float travelSpeed; //!< the current speed of the player (to make soft movement) |
---|
| 68 | float acceleration; //!< the acceleration of the player. |
---|
[6222] | 69 | |
---|
[6162] | 70 | float airViscosity; |
---|
[5996] | 71 | |
---|
| 72 | }; |
---|
| 73 | |
---|
[6002] | 74 | #endif /* _HELICOPTERS_H */ |
---|