Changeset 4818 in orxonox.OLD for orxonox/trunk/src/world_entities/player.h
- Timestamp:
- Jul 7, 2005, 5:24:34 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/player.h
r4780 r4818 2 2 \file player.h 3 3 \brief Implements a basic controllable WorldEntity 4 */4 */ 5 5 6 6 #ifndef _PLAYER_H … … 17 17 class World; 18 18 class Event; 19 class Crosshair; 19 20 20 21 //! Basic controllable WorldEntity … … 23 24 friend class World; 24 25 25 public:26 Player();27 Player(const TiXmlElement* root);28 virtual ~Player();26 public: 27 Player(); 28 Player(const TiXmlElement* root); 29 virtual ~Player(); 29 30 30 void init();31 void loadParams(const TiXmlElement* root);31 void init(); 32 void loadParams(const TiXmlElement* root); 32 33 33 void addWeapon(Weapon* weapon);34 void removeWeapon(Weapon* weapon);34 void addWeapon(Weapon* weapon); 35 void removeWeapon(Weapon* weapon); 35 36 36 virtual void postSpawn();37 virtual void leftWorld();38 virtual void hit(WorldEntity* weapon, Vector* loc);39 virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);37 virtual void postSpawn(); 38 virtual void leftWorld(); 39 virtual void hit(WorldEntity* weapon, Vector* loc); 40 virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 40 41 41 virtual void tick(float time);42 virtual void draw();42 virtual void tick(float time); 43 virtual void draw(); 43 44 44 virtual void command(Command* cmd);45 virtual void command(Command* cmd); 45 46 46 virtual void process(const Event &event);47 virtual void process(const Event &event); 47 48 48 private:49 bool bUp; //!< up button pressed.50 bool bDown; //!< down button pressed.51 bool bLeft; //!< left button pressed.52 bool bRight; //!< right button pressed.53 bool bAscend; //!< ascend button pressed.54 bool bDescend; //!< descend button presses.55 bool bFire; //!< fire button pressed.56 bool bWeaponChange; //!< weapon change button pressed57 49 58 tList<Weapon>* weapons;//!< a list of weapon 59 Weapon* activeWeapon; //!< the weapon that is currenty activated 60 Weapon* activeWeaponL; //temporary -- FIX THIS 61 WeaponManager* weaponMan; //!< the weapon manager: managing a list of weapon to wepaon-slot mapping 50 private: 51 void move(float time); 52 void weapon(); 62 53 63 World* myWorld; //!< reference to the world object64 54 65 Vector* velocity; //!< the velocity of the player. 66 float travelSpeed; //!< the current speed of the player (to make soft movement) 67 float acceleration; //!< the acceleration of the player. 55 private: 56 bool bUp; //!< up button pressed. 57 bool bDown; //!< down button pressed. 58 bool bLeft; //!< left button pressed. 59 bool bRight; //!< right button pressed. 60 bool bAscend; //!< ascend button pressed. 61 bool bDescend; //!< descend button presses. 62 bool bFire; //!< fire button pressed. 63 bool bWeaponChange; //!< weapon change button pressed 68 64 69 void move(float time); 70 void weapon(); 65 tList<Weapon>* weapons;//!< a list of weapon 66 Weapon* activeWeapon; //!< the weapon that is currenty activated 67 Weapon* activeWeaponL; //temporary -- FIX THIS 68 WeaponManager* weaponMan; //!< the weapon manager: managing a list of weapon to wepaon-slot mapping 69 70 World* myWorld; //!< reference to the world object 71 72 Vector* velocity; //!< the velocity of the player. 73 float travelSpeed; //!< the current speed of the player (to make soft movement) 74 float acceleration; //!< the acceleration of the player. 75 76 Crosshair* crosshair; //!< the crosshair of the player 71 77 72 78 };
Note: See TracChangeset
for help on using the changeset viewer.