|
Last change
on this file since 6981 was
6871,
checked in by bensch, 20 years ago
|
|
orxonox/trunk: small fixes (cleanup)
|
|
File size:
2.0 KB
|
| Line | |
|---|
| 1 | |
|---|
| 2 | /*! |
|---|
| 3 | * @file hover.h |
|---|
| 4 | * Implements the Control of a Hover |
|---|
| 5 | */ |
|---|
| 6 | |
|---|
| 7 | #ifndef _HOVER_H |
|---|
| 8 | #define _HOVER_H |
|---|
| 9 | |
|---|
| 10 | #include "playable.h" |
|---|
| 11 | |
|---|
| 12 | class Hover : public Playable |
|---|
| 13 | { |
|---|
| 14 | public: |
|---|
| 15 | |
|---|
| 16 | Hover(const char* fileName); |
|---|
| 17 | Hover(const TiXmlElement* root = NULL); |
|---|
| 18 | virtual ~Hover(); |
|---|
| 19 | |
|---|
| 20 | virtual void loadParams(const TiXmlElement* root); |
|---|
| 21 | |
|---|
| 22 | virtual void enter(); |
|---|
| 23 | virtual void leave(); |
|---|
| 24 | |
|---|
| 25 | virtual void postSpawn(); |
|---|
| 26 | virtual void leftWorld(); |
|---|
| 27 | |
|---|
| 28 | virtual void collidesWith(WorldEntity* entity, const Vector& location); |
|---|
| 29 | virtual void tick(float dt); |
|---|
| 30 | virtual void draw() const; |
|---|
| 31 | |
|---|
| 32 | virtual void process(const Event &event); |
|---|
| 33 | |
|---|
| 34 | private: |
|---|
| 35 | void init(); |
|---|
| 36 | void movement(float dt); |
|---|
| 37 | |
|---|
| 38 | private: |
|---|
| 39 | bool bForward; //!< forward button pressed. |
|---|
| 40 | bool bBackward; //!< backward button pressed. |
|---|
| 41 | bool bLeft; //!< left button pressed. |
|---|
| 42 | bool bRight; //!< right button pressed. |
|---|
| 43 | bool bAscend; //!< ascend button pressed. |
|---|
| 44 | bool bDescend; //!< descend button presses. |
|---|
| 45 | |
|---|
| 46 | int yInvert; |
|---|
| 47 | float mouseSensitivity; //!< the mouse sensitivity |
|---|
| 48 | |
|---|
| 49 | PNode wingNodeLeft; |
|---|
| 50 | PNode wingNodeRight; |
|---|
| 51 | PNode rotorNodeLeft; |
|---|
| 52 | PNode rotorNodeRight; |
|---|
| 53 | |
|---|
| 54 | PNode cameraNode; |
|---|
| 55 | float cameraLook; |
|---|
| 56 | float rotation; |
|---|
| 57 | |
|---|
| 58 | Vector velocity; //!< the velocity of the Hover. |
|---|
| 59 | Quaternion direction; //!< the direction of the Hover. |
|---|
| 60 | float travelSpeed; //!< the current speed of the Hove (to make soft movement) |
|---|
| 61 | float acceleration; //!< the acceleration of the Hover. |
|---|
| 62 | |
|---|
| 63 | float rotorSpeed; //!< the speed of the rotor. |
|---|
| 64 | float rotorCycle; //!< The Cycle the rotor is in. |
|---|
| 65 | |
|---|
| 66 | float airViscosity; |
|---|
| 67 | |
|---|
| 68 | }; |
|---|
| 69 | |
|---|
| 70 | #endif /* _HOVERS_H */ |
|---|
Note: See
TracBrowser
for help on using the repository browser.