Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6804 was 6803, checked in by bensch, 20 years ago

trunk: WeaponManager fix

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