Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/openAL/src/world_entities/player.h @ 4194

Last change on this file since 4194 was 4194, checked in by bensch, 19 years ago

orxonox/branches/openAL: merged trunk back to openAL
merged with command:

svn merge ../trunk/ openAL/ -r 3920:HEAD

no conflicts at all

File size: 1.8 KB
RevLine 
[3471]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
[3583]11template<class T> class tList;
12class Weapon;
[3873]13class WeaponManager;
[3608]14class Vector;
[3620]15class World;
[3471]16
17//! Basic controllable WorldEntity
18class Player : public WorldEntity
19{
20  friend class World;
21 
22 public:
[3620]23  Player();
[4194]24  Player(TiXmlElement* root);
[3531]25  virtual ~Player();
[3583]26
27  void addWeapon(Weapon* weapon);
28  void removeWeapon(Weapon* weapon);
[3471]29 
30  virtual void postSpawn();
[3583]31  virtual void leftWorld();
[3578]32  virtual void hit(WorldEntity* weapon, Vector* loc);
[3471]33  virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
[3583]34
35  virtual void tick(float time); 
36  virtual void draw();
37
[3471]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.
[3585]48  bool bWeaponChange;    //!< weapon change button pressed
[3471]49
[3583]50  tList<Weapon>* weapons;//!< a list of weapon
[3585]51  Weapon* activeWeapon;  //!< the weapon that is currenty activated
[3755]52  Weapon* activeWeaponL;  //temporary -- FIX THIS
[3873]53  WeaponManager* weaponMan; //!< the weapon manager: managing a list of weapon to wepaon-slot mapping
[3755]54
[3620]55  World* myWorld;        //!< reference to the world object
[3583]56
[3608]57  Vector* velocity;       //!< the velocity of the player.
[3471]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);
[3620]62  void weapon(void);
[3471]63 
64};
65
66#endif /* _PLAYER_H */
Note: See TracBrowser for help on using the repository browser.