Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/space_ships/hover.h @ 6800

Last change on this file since 6800 was 6800, checked in by bensch, 18 years ago

trunk: hover functionality

File size: 2.6 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
12class Hover : public Playable
13{
14  public:
15
16    Hover();
17    Hover(const char* fileName);
18    Hover(const TiXmlElement* root);
19    virtual ~Hover();
20
21    void init();
22    virtual void loadParams(const TiXmlElement* root);
23
24    virtual void enter();
25    virtual void leave();
26    virtual void attachCamera();
27
28    virtual void postSpawn();
29    virtual void leftWorld();
30
31    virtual void collidesWith(WorldEntity* entity, const Vector& location);
32    virtual void tick(float time);
33    virtual void draw() const;
34
35    virtual void process(const Event &event);
36
37  private:
38    void calculateVelocity(float time);
39    void weaponAction();
40
41    bool                  bUp;                //!< up button pressed.
42    bool                  bDown;              //!< down button pressed.
43    bool                  bLeft;              //!< left button pressed.
44    bool                  bRight;             //!< right button pressed.
45    bool                  bAscend;            //!< ascend button pressed.
46    bool                  bDescend;           //!< descend button presses.
47    bool                  bFire;              //!< fire button pressed.
48    bool                  bRollL;             //!< rolling button pressed (left)
49    bool                  bRollR;             //!< rolling button pressed (right)
50
51    float                 xMouse;             //!< mouse moved in x-Direction
52    float                 yMouse;             //!< mouse moved in y-Direction
53    int                   yInvert;
54    float                 mouseSensitivity;   //!< the mouse sensitivity
55    int                   controlVelocityX;
56    int                   controlVelocityY;
57    //float                 cycle;              //!< hovercycle
58
59    PNode                 wingNodeLeft;
60    PNode                 wingNodeRight;
61    PNode                 rotorNodeLeft;
62    PNode                 rotorNodeRight;
63
64    PNode                 cameraNode;
65
66    Vector                velocity;           //!< the velocity of the player.
67    Vector                velocityDir;        //!< the direction of the velocity of the spaceship
68    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
69    float                 acceleration;       //!< the acceleration of the player.
70    //float                 rotorspeed;         //!< the speed of the rotor.
71    //float                 tailrotorspeed;     //!< the relativ speed ot the tail rotor
72
73    float                 airViscosity;
74
75};
76
77#endif /* _HOVERS_H */
Note: See TracBrowser for help on using the repository browser.