source:
orxonox.OLD/orxonox/branches/chris/src/player.h
@
2627
Last change on this file since 2627 was 2194, checked in by chris, 20 years ago | |
---|---|
File size: 962 bytes |
Rev | Line | |
---|---|---|
[2141] | 1 | /*! |
2 | \file player.h | |
3 | \brief Implements a basic controllable WorldEntity | |
4 | */ | |
[1853] | 5 | |
6 | #ifndef PLAYER_H | |
7 | #define PLAYER_H | |
8 | ||
[2058] | 9 | #include "world_entity.h" |
[1853] | 10 | |
[2141] | 11 | //! Basic controllable WorldEntity |
[2058] | 12 | class Player : public WorldEntity |
13 | { | |
[2096] | 14 | friend class World; |
[2058] | 15 | |
[1853] | 16 | public: |
[2101] | 17 | Player (bool isFree = false); |
[1853] | 18 | ~Player (); |
19 | ||
[2194] | 20 | static bool is_a(char* name); |
21 | ||
[2096] | 22 | virtual void post_spawn (); |
23 | virtual void tick (float time); | |
[2192] | 24 | virtual void hit (Damage* dmg, WorldEntity* instigator, Uint32 hitflags); |
[2096] | 25 | virtual void destroy (); |
26 | virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); | |
27 | virtual void command (Command* cmd); | |
[2194] | 28 | |
[2096] | 29 | virtual void draw (); |
30 | virtual void get_lookat (Location* locbuf); | |
[1899] | 31 | |
[2096] | 32 | virtual void left_world (); |
[2058] | 33 | |
[1856] | 34 | private: |
[2194] | 35 | static bool (*basefunc)(char*); |
36 | static char *is; | |
37 | ||
[2096] | 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 | ||
[1853] | 46 | }; |
47 | ||
48 | #endif |
Note: See TracBrowser
for help on using the repository browser.