source:
orxonox.OLD/orxonox/branches/nico/src/player.h
@
3659
Last change on this file since 3659 was 3399, checked in by bensch, 20 years ago | |
---|---|
File size: 906 bytes |
Rev | Line | |
---|---|---|
[2190] | 1 | /*! |
2 | \file player.h | |
3 | \brief Implements a basic controllable WorldEntity | |
4 | */ | |
[1853] | 5 | |
[3238] | 6 | #ifndef _PLAYER_H |
7 | #define _PLAYER_H | |
[1853] | 8 | |
[2036] | 9 | #include "world_entity.h" |
[1853] | 10 | |
[3399] | 11 | class OBJModel; |
12 | ||
[2190] | 13 | //! Basic controllable WorldEntity |
[2036] | 14 | class Player : public WorldEntity |
15 | { | |
[2551] | 16 | friend class World; |
17 | ||
[1853] | 18 | public: |
[3238] | 19 | Player(bool isFree = false); |
20 | ~Player(); | |
[2551] | 21 | |
[3238] | 22 | virtual void postSpawn(); |
23 | virtual void tick(float time); | |
24 | virtual void hit(WorldEntity* weapon, Vector loc); | |
25 | virtual void destroy(); | |
26 | virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); | |
27 | virtual void command(Command* cmd); | |
[1900] | 28 | |
[3238] | 29 | virtual void draw(); |
[3399] | 30 | // virtual void getLookat(Location* locbuf); |
[2551] | 31 | |
[3238] | 32 | virtual void leftWorld(); |
[2551] | 33 | |
[1856] | 34 | private: |
[2551] | 35 | bool bUp, bDown, bLeft, bRight, bAscend, bDescend; |
36 | bool bFire; | |
37 | Vector velocity; | |
[3238] | 38 | float travelSpeed; |
[2551] | 39 | float acceleration; |
[2730] | 40 | GLuint objectList; |
[2551] | 41 | |
[3238] | 42 | void move(float time); |
[2551] | 43 | |
[1853] | 44 | }; |
45 | ||
[3238] | 46 | #endif /* _PLAYER_H */ |
Note: See TracBrowser
for help on using the repository browser.