Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3542 was 3542, checked in by chris, 19 years ago

orxonox/branches/levelloader: First incarnation of a debugworld loaded from a XML-File in place, compilability in place, all necessary basic loading constuctors in place. Unfortunately the code still generates interferences with the old hardcoded debugworld resulting in SegFault crash.

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