Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/space_ships/helicopter.h @ 6428

Last change on this file since 6428 was 6426, checked in by bensch, 19 years ago

orxonox/trunk: merged the spaceshipcontrol branche back to the trunk

merged with command
svn merge https://svn.orxonox.net/orxonox/branches/spaceshipcontrol . -r6224:HEAD
small conflict in space_ship.cc fixed in favor of the control

File size: 2.4 KB
RevLine 
[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]13class 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.
[6426]69    float                 rotorspeed;         //!< the speed of the rotor.
70    float                 tailrotorspeed;     //!< the relativ speed ot the tail rotor
[6222]71
[6162]72    float                 airViscosity;
[5996]73
74};
75
[6002]76#endif /* _HELICOPTERS_H */
Note: See TracBrowser for help on using the repository browser.