Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/levelloader/src/world_entities/player.h @ 3725

Last change on this file since 3725 was 3605, checked in by bensch, 20 years ago

orxonox/trunk: merged trunk back to levelloader
merged with command:
svn merge -r 3499:HEAD trunk branches/levelloader

Conflicts in
C track_manager.h
C world_entities/player.cc
C world_entities/player.h
C world_entities/environment.h
C lib/coord/p_node.cc
C defs/debug.h
C track_manager.cc
C story_entities/campaign.h

solved in merge-favouring. It was quite easy because Chris only worked on the headers, and he didi it quite clean. Thats the spirit :)

Conflits in world.cc are a MESS: fix it

File size: 1.6 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 OBJModel;
13class Weapon;
14
15//! Basic controllable WorldEntity
16class Player : public WorldEntity
17{
18  friend class World;
19 
20 public:
21  Player(bool isFree = false);
22  Player(TiXmlElement* root);
23  virtual ~Player();
24
25  void addWeapon(Weapon* weapon);
26  void removeWeapon(Weapon* weapon);
27 
28  virtual void postSpawn();
29  virtual void leftWorld();
30  virtual void hit(WorldEntity* weapon, Vector* loc);
31  virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
32
33  virtual void tick(float time); 
34  virtual void draw();
35
36  virtual void command(Command* cmd);
37 
38 private:
39  bool bUp;              //!< up button pressed.
40  bool bDown;            //!< down button pressed.
41  bool bLeft;            //!< left button pressed.
42  bool bRight;           //!< right button pressed.
43  bool bAscend;          //!< ascend button pressed.
44  bool bDescend;         //!< descend button presses.
45  bool bFire;            //!< fire button pressed.
46  bool bWeaponChange;    //!< weapon change button pressed
47
48  tList<Weapon>* weapons;//!< a list of weapon
49  Weapon* activeWeapon;  //!< the weapon that is currenty activated
50
51  Vector velocity;       //!< the velocity of the player.
52  float travelSpeed;     //!< the current speed of the player (to make soft movement)
53  float acceleration;    //!< the acceleration of the player.
54 
55  void move(float time);
56  void fire(void);
57 
58};
59
60#endif /* _PLAYER_H */
Note: See TracBrowser for help on using the repository browser.