Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/heightMap/src/world_entities/player.h @ 4225

Last change on this file since 4225 was 4122, checked in by bensch, 20 years ago

orxonox/branches/heightMap: merged the Trunk back into branches/heightMap:
merged with Command
svn merge -r 3918:HEAD trunk branches/heightMap
conflicts resolved in favor of the Trunk

File size: 1.8 KB
Line 
1/*!
2    \file player.h
3    \brief Implements a basic controllable WorldEntity
4*/
5
6#ifndef _PLAYER_H
7#define _PLAYER_H
8
9#include "world_entity.h"
10
11template<class T> class tList;
12class Weapon;
13class WeaponManager;
14class Vector;
15class World;
16
17//! Basic controllable WorldEntity
18class Player : public WorldEntity
19{
20  friend class World;
21 
22 public:
23  Player();
24  Player(TiXmlElement* root);
25  virtual ~Player();
26
27  void addWeapon(Weapon* weapon);
28  void removeWeapon(Weapon* weapon);
29 
30  virtual void postSpawn();
31  virtual void leftWorld();
32  virtual void hit(WorldEntity* weapon, Vector* loc);
33  virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
34
35  virtual void tick(float time); 
36  virtual void draw();
37
38  virtual void command(Command* cmd);
39 
40 private:
41  bool bUp;              //!< up button pressed.
42  bool bDown;            //!< down button pressed.
43  bool bLeft;            //!< left button pressed.
44  bool bRight;           //!< right button pressed.
45  bool bAscend;          //!< ascend button pressed.
46  bool bDescend;         //!< descend button presses.
47  bool bFire;            //!< fire button pressed.
48  bool bWeaponChange;    //!< weapon change button pressed
49
50  tList<Weapon>* weapons;//!< a list of weapon
51  Weapon* activeWeapon;  //!< the weapon that is currenty activated
52  Weapon* activeWeaponL;  //temporary -- FIX THIS
53  WeaponManager* weaponMan; //!< the weapon manager: managing a list of weapon to wepaon-slot mapping
54
55  World* myWorld;        //!< reference to the world object
56
57  Vector* velocity;       //!< the velocity of the player.
58  float travelSpeed;     //!< the current speed of the player (to make soft movement)
59  float acceleration;    //!< the acceleration of the player.
60 
61  void move(float time);
62  void weapon(void);
63 
64};
65
66#endif /* _PLAYER_H */
Note: See TracBrowser for help on using the repository browser.