Last change
on this file since 2066 was
2066,
checked in by chris, 20 years ago
|
orxonox/branches/chris: Implemented CommandNode (Keyboard handling), created some functions to convert key names to identifyers and vice versa, ensured it compiles (when compiled spereately) added a header to hold global message structures
|
File size:
1.1 KB
|
Line | |
---|
1 | |
---|
2 | #ifndef WORLD_ENTITY_H |
---|
3 | #define WORLD_ENTITY_H |
---|
4 | |
---|
5 | #include "stdincl.h" |
---|
6 | //#include "data_tank.h" |
---|
7 | |
---|
8 | class Vector; |
---|
9 | class Ability; |
---|
10 | |
---|
11 | class WorldEntity { |
---|
12 | |
---|
13 | public: |
---|
14 | WorldEntity (); |
---|
15 | ~WorldEntity (); |
---|
16 | |
---|
17 | |
---|
18 | void setPosition(Vector* position); |
---|
19 | Vector* getPosition(); |
---|
20 | void setOrientation(Vector* orientation); |
---|
21 | Vector* getOrientation(); |
---|
22 | void setSpawnPoint(Vector* place); |
---|
23 | void setSpeed(float speed); |
---|
24 | float getSpeed(); |
---|
25 | void setHealth(float health); |
---|
26 | float getHealth(); |
---|
27 | |
---|
28 | void addAbility(Ability* ability); |
---|
29 | void removeAbility(Ability* ability); |
---|
30 | |
---|
31 | virtual void tick(float time); |
---|
32 | virtual void paint(); |
---|
33 | /* virtual void actionEvent(Event* event); */ |
---|
34 | virtual void collide(WorldEntity* we, Vector loc); |
---|
35 | virtual void hit(WorldEntity* weapon, Vector loc); |
---|
36 | virtual void destroy(); |
---|
37 | virtual void command (Command* cmd); |
---|
38 | |
---|
39 | virtual void entityPreEnter(); |
---|
40 | virtual void entityPostEnter(); |
---|
41 | virtual void entityPreQuit(); |
---|
42 | virtual void entityPostQuit(); |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | private: |
---|
47 | Vector* position; |
---|
48 | Vector* orientation; |
---|
49 | /* List of abilities */ |
---|
50 | float health; |
---|
51 | float speed; |
---|
52 | /* entity can be in the air or at ground: */ |
---|
53 | int airGround; |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | }; |
---|
58 | |
---|
59 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.