Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/old.chris/src/player.h @ 3715

Last change on this file since 3715 was 2194, checked in by chris, 20 years ago

orxonox/branches/chris: Implemented is_a() query for WorldEntities

File size: 962 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
11//! Basic controllable WorldEntity
12class Player : public WorldEntity
13{
14        friend class World;
15
16 public:
17  Player (bool isFree = false);
18  ~Player ();
19
20        static bool is_a(char* name);
21
22        virtual void post_spawn ();
23  virtual void tick (float time);
24  virtual void hit (Damage* dmg, WorldEntity* instigator, Uint32 hitflags);
25  virtual void destroy ();
26  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
27        virtual void command (Command* cmd);
28   
29  virtual void draw ();
30  virtual void get_lookat (Location* locbuf);
31
32        virtual void left_world ();
33
34 private:
35        static bool (*basefunc)(char*);
36  static char *is;
37
38        bool bUp, bDown, bLeft, bRight, bAscend, bDescend;
39        bool bFire;
40        Vector velocity;
41        float travel_speed;
42        float acceleration;
43       
44        void move (float time);
45       
46};
47
48#endif
Note: See TracBrowser for help on using the repository browser.