Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/presentation/src/world_entities/creatures/fps_player.h @ 9163

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

aiming system integration

File size: 1.5 KB
Line 
1/*!
2 * @file fps_player.h
3 * Implements a playable for fps games
4 */
5
6#ifndef _FPS_PLAYER_H
7#define _FPS_PLAYER_H
8
9
10#include "playable.h"
11
12
13class AimingSystem;
14
15
16class FPSPlayer : public Playable
17{
18
19  public:
20    FPSPlayer(const TiXmlElement* root = NULL);
21    virtual ~FPSPlayer();
22
23    virtual void loadParams(const TiXmlElement* root);
24
25    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
26
27    virtual void enter();
28    virtual void leave();
29
30    virtual void reset();
31
32    virtual void destroy(WorldEntity* killer);
33    virtual void respawn();
34
35    virtual void tick(float time);
36    virtual void draw() const;
37
38
39    virtual void process(const Event &event);
40
41  private:
42    void init();
43
44    bool                  bLeft;
45    bool                  bRight;
46    bool                  bForward;
47    bool                  bBackward;
48    bool                  bJump;              //!< jumping
49    bool                  bPosBut;             //!< position button
50
51    float                 xMouse;             //!< mouse moved in x-Direction
52    float                 yMouse;             //!< mouse moved in y-Direction
53
54
55    float                 heading;
56    float                 attitude;
57
58    PNode                 cameraNode;
59
60    float                 fallVelocity;        //!< velocity for falling down
61    float                 jumpForce;           //!< the jump force
62
63    bool                  initWeapon;
64
65    AimingSystem*         aimingSystem;        //!< aiming system of the player
66};
67
68#endif
Note: See TracBrowser for help on using the repository browser.