Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 5985 was 5985, checked in by manuel, 18 years ago

merge: factory has now create from class name string function (svn merge -r 5955:HEAD ../trunk/ powerups/)

File size: 2.4 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#include "extendable.h"
11
12template<class T> class tList;
13class Vector;
14class Event;
15
16class SpaceShip : public Playable, public Extendable
17{
18
19  public:
20
21    SpaceShip();
22    SpaceShip(const char* fileName);
23    SpaceShip(const TiXmlElement* root);
24    virtual ~SpaceShip();
25
26    void init();
27    void loadParams(const TiXmlElement* root);
28
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);
37    virtual void draw() const;
38
39    virtual void process(const Event &event);
40
41    bool pickup(PowerUp* powerUp);
42
43
44
45  private:
46
47    void calculateVelocity(float time);
48    void weaponAction();
49
50    // !! temporary !!
51    void ADDWEAPON();
52
53    bool                  bUp;                //!< up button pressed.
54    bool                  bDown;              //!< down button pressed.
55    bool                  bLeft;              //!< left button pressed.
56    bool                  bRight;             //!< right button pressed.
57    bool                  bAscend;            //!< ascend button pressed.
58    bool                  bDescend;           //!< descend button presses.
59    bool                  bFire;              //!< fire button pressed.
60    bool                  bRollL;             //!< rolling button pressed (left)
61    bool                  bRollR;             //!< rolling button pressed (right)
62   
63    float                 xMouse;             //!< mouse moved in x-Direction
64    float                 yMouse;             //!< mouse moved in y-Direction
65    float                 mouseSensitivity;   //!< the mouse sensitivity
66    float                 cycle;              //!< hovercycle
67
68    Vector                velocity;           //!< the velocity of the player.
69    Vector                velocityDir;        //!< the direction of the velocity of the spaceship
70    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
71    float                 acceleration;       //!< the acceleration of the player.
72
73};
74
75#endif /* _SPACE_SHIPS_H */
Note: See TracBrowser for help on using the repository browser.