Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/space_ships/spacecraft_2d.h @ 9061

Last change on this file since 9061 was 9061, checked in by patrick, 18 years ago

merged the single_player branche to trunk

File size: 2.1 KB
RevLine 
[5996]1
2/*!
[9045]3 * @file spacecraft_2d.h
4 * Implements the Control of a Spacecraft2D
[5996]5 */
6
[9045]7#ifndef _SPACECRAFT_2D_H
8#define _SPACECRAFT_2D_H
[5996]9
10#include "playable.h"
11
[7001]12// Forward Declaration
13class ParticleEmitter;
14class ParticleSystem;
15
[9045]16class Spacecraft2D : public Playable
[5996]17{
18  public:
[9045]19    Spacecraft2D(const std::string& fileName);
20    Spacecraft2D(const TiXmlElement* root = NULL);
21    virtual ~Spacecraft2D();
[5996]22
[6512]23    virtual void loadParams(const TiXmlElement* root);
[7348]24    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
[9052]25    void setTravelDirecton(const Quaternion& rot, float speed = 0.0);
26    void setTravelSpeed(float travelSpeed);
27
[6222]28    virtual void enter();
29    virtual void leave();
30
[9052]31
32
[5996]33    virtual void postSpawn();
34    virtual void leftWorld();
35
36    virtual void collidesWith(WorldEntity* entity, const Vector& location);
[6806]37    virtual void tick(float dt);
[6005]38    virtual void draw() const;
[5996]39
40    virtual void process(const Event &event);
41
42  private:
[6803]43    void init();
[6806]44    void movement(float dt);
[6803]45
46  private:
[6805]47    bool                  bForward;           //!< forward button pressed.
48    bool                  bBackward;          //!< backward button pressed.
[5996]49    bool                  bLeft;              //!< left button pressed.
50    bool                  bRight;             //!< right button pressed.
51
[6637]52    int                   yInvert;
[5996]53    float                 mouseSensitivity;   //!< the mouse sensitivity
[6799]54
[9052]55
56
57    PNode                 travelNode;
58    float                 travelSpeed;
59
[6807]60    float                 cameraLook;
61    float                 rotation;
[5996]62
[9045]63   // Vector                velocity;           //!< the velocity of the Spacecraft2D.
64    Quaternion            direction;          //!< the direction of the Spacecraft2D.
65    float                 acceleration;       //!< the acceleration of the Spacecraft2D.
[9052]66    float                 maxSpeed;           //!< The Maximal speed of the Spacecraft2D.
[6222]67
[9052]68    float                 altitude;           //!< The height in the Entity.
[6806]69
[9046]70    ParticleEmitter*      burstEmitter;
[7001]71    ParticleSystem*       burstSystem;
[5996]72};
73
[9045]74#endif /* _SPACECRAFT_2DS_H */
Note: See TracBrowser for help on using the repository browser.