Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/parenting/src/player.h @ 3308

Last change on this file since 3308 was 3302, checked in by patrick, 19 years ago

orxonox/branches/parenting: implemented parenting and added to framework. sill got some problems with how to pass events through the new entity list (now part of the parenting-framework). changed to a more accurate way of coordinat-ing, the openGL coord-orientation. therefore the world is realy strange because it flies into the wrong direction.

File size: 933 bytes
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#include "importer/object.h"
11
12//! Basic controllable WorldEntity
13class Player : public WorldEntity
14{
15  friend class World;
16 
17 public:
18  Player(bool isFree = false);
19  ~Player();
20 
21  virtual void postSpawn();
22  virtual void tick(float time);
23  virtual void hit(WorldEntity* weapon, Vector loc);
24  virtual void destroy();
25  virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
26  virtual void command(Command* cmd);
27 
28  virtual void draw();
29  // virtual void getLookat(Location* locbuf);
30 
31  virtual void leftWorld();
32 
33 private:
34  bool bUp, bDown, bLeft, bRight, bAscend, bDescend;
35  bool bFire;
36  Vector velocity;
37  float travelSpeed;
38  float acceleration;
39  GLuint objectList;
40  Object* obj;
41 
42  void move(float time);
43 
44};
45
46#endif /* _PLAYER_H */
Note: See TracBrowser for help on using the repository browser.