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
RevLine 
[5996]1
2/*!
[6799]3 * @file hover.h
4 * Implements the Control of a Hover
[5996]5 */
6
[6799]7#ifndef _HOVER_H
8#define _HOVER_H
[5996]9
10#include "playable.h"
11
[6799]12class Hover : public Playable
[5996]13{
14  public:
15
[6799]16    Hover();
17    Hover(const char* fileName);
18    Hover(const TiXmlElement* root);
19    virtual ~Hover();
[5996]20
21    void init();
[6512]22    virtual void loadParams(const TiXmlElement* root);
[5996]23
[6222]24    virtual void enter();
25    virtual void leave();
[6724]26    virtual void attachCamera();
[6222]27
[5996]28    virtual void postSpawn();
29    virtual void leftWorld();
30
31    virtual void collidesWith(WorldEntity* entity, const Vector& location);
32    virtual void tick(float time);
[6005]33    virtual void draw() const;
[5996]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
[6637]53    int                   yInvert;
[5996]54    float                 mouseSensitivity;   //!< the mouse sensitivity
[6724]55    int                   controlVelocityX;
56    int                   controlVelocityY;
[6637]57    //float                 cycle;              //!< hovercycle
[6799]58
[6800]59    PNode                 wingNodeLeft;
60    PNode                 wingNodeRight;
61    PNode                 rotorNodeLeft;
62    PNode                 rotorNodeRight;
[6799]63
[6724]64    PNode                 cameraNode;
[5996]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.
[6637]70    //float                 rotorspeed;         //!< the speed of the rotor.
71    //float                 tailrotorspeed;     //!< the relativ speed ot the tail rotor
[6222]72
[6162]73    float                 airViscosity;
[5996]74
75};
76
[6799]77#endif /* _HOVERS_H */
Note: See TracBrowser for help on using the repository browser.