Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/space_ships/space_ship.h @ 5985

Last change on this file since 5985 was 5978, checked in by bensch, 19 years ago

orxonox/trunk:
merged spaceshipcontrol back to the trunk
merged with command:
svn merge -r5915:HEAD spaceshipcontrol/ ../trunk/
no conflicts (nice work guys :)

File size: 2.3 KB
Line 
1/*!
2 * @file space_ship.h
3 * Implements the Control of a Spaceship
4 */
5
6#ifndef _SPACE_SHIP_H
7#define _SPACE_SHIP_H
8
9#include "playable.h"
10
11template<class T> class tList;
12class Vector;
13class Event;
14
15class SpaceShip : public Playable
16{
17
18  public:
19
20    SpaceShip();
21    SpaceShip(const char* fileName);
22    SpaceShip(const TiXmlElement* root);
23    virtual ~SpaceShip();
24
25    void init();
26    void loadParams(const TiXmlElement* root);
27
28    void addWeapon(Weapon* weapon );
29    void removeWeapon(Weapon* weapon);
30
31    virtual void postSpawn();
32    virtual void leftWorld();
33
34    virtual void collidesWith(WorldEntity* entity, const Vector& location);
35    virtual void tick(float time);
36    virtual void draw() const;
37
38    virtual void process(const Event &event);
39
40
41
42  private:
43
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.
69
70};
71
72#endif /* _SPACE_SHIPS_H */
Note: See TracBrowser for help on using the repository browser.