Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/creatures/md2_creature.h @ 6684

Last change on this file since 6684 was 6561, checked in by bensch, 19 years ago

trunk: WeaponManager update

File size: 2.7 KB
Line 
1/*!
2 * @file md2_creature.h
3 * Implements the control of a md2 model
4 */
5
6#ifndef _MD2_CREATURE_H
7#define _MD2_CREATURE_H
8
9#include "playable.h"
10
11
12template<class T> class tList;
13class Vector;
14class Event;
15
16class MD2Creature : public Playable
17{
18
19  public:
20
21    MD2Creature();
22    MD2Creature(const char* fileName);
23    MD2Creature(const TiXmlElement* root);
24    virtual ~MD2Creature();
25
26    void init();
27    virtual void loadParams(const TiXmlElement* root);
28
29    virtual void enter();
30    virtual void leave();
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
42
43  private:
44
45    void calculateVelocity(float time);
46    void weaponAction();
47
48    // !! temporary !!
49    void ADDWEAPON();
50
51    bool                  bUp;                //!< up button pressed.
52    bool                  bDown;              //!< down button pressed.
53    bool                  bLeft;              //!< left button pressed.
54    bool                  bRight;             //!< right button pressed.
55    bool                  bAscend;            //!< ascend button pressed.
56    bool                  bDescend;           //!< descend button presses.
57    bool                  bFire;              //!< fire button pressed.
58    bool                  bRollL;             //!< rolling button pressed (left)
59    bool                  bRollR;             //!< rolling button pressed (right)
60    bool                  bStrafeL;           //!< strafe to the left side
61    bool                  bStrafeR;           //!< strafe to the rith side
62    bool                  bJump;              //!< jump
63
64    PNode                 cameraConnNode;     //!< The Node the camera is connected to.
65
66    float                 xMouse;             //!< mouse moved in x-Direction
67    float                 yMouse;             //!< mouse moved in y-Direction
68    float                 mouseSensitivity;   //!< the mouse sensitivity
69    float                 cycle;              //!< hovercycle
70
71    Vector                velocity;           //!< the velocity of the player.
72    Quaternion            mouseDirX;           //!< the direction where the player wants to fly
73    Quaternion            mouseDirY;           //!< the direction where the player wants to fly
74    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
75    float                 acceleration;       //!< the acceleration of the player.
76
77    float                 airViscosity;
78
79};
80
81#endif /* _MD2_CREATURE_H */
Note: See TracBrowser for help on using the repository browser.