Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/single_player_map/src/world_entities/space_ships/spacecraft_2d.h @ 9046

Last change on this file since 9046 was 9046, checked in by bensch, 18 years ago

orxonox/branches/single_player_map: added Spacecraft_2d

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);
[6222]25    virtual void enter();
26    virtual void leave();
27
[5996]28    virtual void postSpawn();
29    virtual void leftWorld();
30
31    virtual void collidesWith(WorldEntity* entity, const Vector& location);
[6806]32    virtual void tick(float dt);
[6005]33    virtual void draw() const;
[5996]34
35    virtual void process(const Event &event);
36
37  private:
[6803]38    void init();
[6806]39    void movement(float dt);
[6803]40
41  private:
[6805]42    bool                  bForward;           //!< forward button pressed.
43    bool                  bBackward;          //!< backward button pressed.
[5996]44    bool                  bLeft;              //!< left button pressed.
45    bool                  bRight;             //!< right button pressed.
46
[6637]47    int                   yInvert;
[5996]48    float                 mouseSensitivity;   //!< the mouse sensitivity
[6799]49
[6724]50    PNode                 cameraNode;
[6807]51    float                 cameraLook;
52    float                 rotation;
[5996]53
[9045]54   // Vector                velocity;           //!< the velocity of the Spacecraft2D.
55    Quaternion            direction;          //!< the direction of the Spacecraft2D.
[6805]56    float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
[9045]57    float                 acceleration;       //!< the acceleration of the Spacecraft2D.
[6999]58    float                 airFriction;        //!< AirFriction.
[6222]59
[6806]60    float                 rotorSpeed;         //!< the speed of the rotor.
61    float                 rotorCycle;         //!< The Cycle the rotor is in.
62
[6162]63    float                 airViscosity;
[5996]64
[9046]65    ParticleEmitter*      burstEmitter;
[7001]66    ParticleSystem*       burstSystem;
[5996]67};
68
[9045]69#endif /* _SPACECRAFT_2DS_H */
Note: See TracBrowser for help on using the repository browser.