Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/hud/src/world_entities/creatures/fps_player.h @ 10685

Last change on this file since 10685 was 10685, checked in by bknecht, 17 years ago

My computer is not working anymore, so I upload my unfinished work to continue my work

File size: 2.3 KB
RevLine 
[8685]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
[9235]13class AimingSystem;
14
15
[8685]16class FPSPlayer : public Playable
17{
[9869]18  ObjectListDeclaration(FPSPlayer);
[8685]19
20  public:
21    FPSPlayer(const TiXmlElement* root = NULL);
22    virtual ~FPSPlayer();
23
24    virtual void loadParams(const TiXmlElement* root);
25
26    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
27
28    virtual void enter();
29    virtual void leave();
30
31    virtual void reset();
32
[9235]33    virtual void destroy(WorldEntity* killer);
34    virtual void respawn();
[8686]35
[8685]36    virtual void tick(float time);
[8686]37    virtual void draw() const;
[10685]38   
39    void displayHUDText( const std::string& message );
[8685]40
[8686]41
[8685]42    virtual void process(const Event &event);
43
44  private:
45    void init();
46
[10647]47    bool                  bLeft;             //!< strafe left
48    bool                  bRight;            //!< strafe right
49    bool                  bForward;          //!< walk forward
50    bool                  bBackward;         //!< walk backward
51    bool                  bJump;             //!< jumping
52    bool                  bPosBut;           //!< position button
53    bool                  bFire;             //!< fire button
[10654]54    bool                  bFire2;            //!< alternate fire button
[10647]55    bool                  bCrouch;           //!< crouch button
[8685]56
[10647]57    float                 xMouse;            //!< mouse moved in x-Direction
58    float                 yMouse;            //!< mouse moved in y-Direction
[8685]59
60
[10647]61    float                 heading;           //!< the direction where the player heads to
62    float                 attitude;          //!< defines the camera angle to the x-z-plane
[8731]63
[10647]64    PNode                 cameraNode;        //!< the "eyes" of the player (or call it head if you want)
[9003]65
[10647]66    float                 fallVelocity;      //!< velocity for falling down
67    float                 jumpAcceleration;  //!< the jump acceleration
[9235]68
69    bool                  initWeapon;
[10654]70    bool                  changeZoom;        //!< zoom sight of player
71    bool                  inZoomMode;        //!< zoomsight
72    bool                  changingZoom;
[9235]73
[10647]74    AimingSystem*         aimingSystem;      //!< aiming system of the player
[9235]75
[10647]76    float                 damageTicker;      //!< ticker for dealing damage
77   
[8685]78};
79
80#endif
Note: See TracBrowser for help on using the repository browser.