Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10718 was 10718, checked in by rennerc, 17 years ago

dead gui :D

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