|
Last change
on this file since 2050 was
2043,
checked in by patrick, 21 years ago
|
|
orxonox/tunk/src: extended worldentity, added doxygen comments, added class ability (empty)
|
|
File size:
1.1 KB
|
| Rev | Line | |
|---|
| [2036] | 1 | |
|---|
| 2 | #ifndef WORLD_ENTITY_H |
|---|
| 3 | #define WORLD_ENTITY_H |
|---|
| 4 | |
|---|
| 5 | #include "data_tank.h" |
|---|
| 6 | |
|---|
| [2043] | 7 | class Vector; |
|---|
| 8 | class Ability; |
|---|
| [2036] | 9 | |
|---|
| 10 | class WorldEntity { |
|---|
| 11 | |
|---|
| 12 | public: |
|---|
| 13 | WorldEntity (); |
|---|
| 14 | ~WorldEntity (); |
|---|
| 15 | |
|---|
| 16 | |
|---|
| [2043] | 17 | void setPosition(Vector* position); |
|---|
| 18 | Vector* getPosition(); |
|---|
| 19 | void setOrientation(Vector* orientation); |
|---|
| 20 | Vector* getOrientation(); |
|---|
| 21 | void setSpawnPoint(Vector* place); |
|---|
| [2036] | 22 | void setSpeed(float speed); |
|---|
| 23 | float getSpeed(); |
|---|
| 24 | void setHealth(float health); |
|---|
| 25 | float getHealth(); |
|---|
| 26 | |
|---|
| [2043] | 27 | void addAbility(Ability* ability); |
|---|
| 28 | void removeAbility(Ability* ability); |
|---|
| [2036] | 29 | |
|---|
| [2043] | 30 | virtual void tick(float time); |
|---|
| [2036] | 31 | virtual void paint(); |
|---|
| 32 | /* virtual void actionEvent(Event* event); */ |
|---|
| [2043] | 33 | virtual void collide(WorldEntity* we, Vector loc); |
|---|
| 34 | virtual void hit(WorldEntity* weapon, Vector loc); |
|---|
| [2036] | 35 | virtual void destroy(); |
|---|
| 36 | |
|---|
| [2043] | 37 | virtual void entityPreEnter(); |
|---|
| 38 | virtual void entityPostEnter(); |
|---|
| 39 | virtual void entityPreQuit(); |
|---|
| 40 | virtual void entityPostQuit(); |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | |
|---|
| [2036] | 44 | private: |
|---|
| [2043] | 45 | Vector* position; |
|---|
| 46 | Vector* orientation; |
|---|
| [2036] | 47 | /* List of abilities */ |
|---|
| 48 | float health; |
|---|
| 49 | float speed; |
|---|
| [2043] | 50 | /* entity can be in the air or at ground: */ |
|---|
| 51 | int airGround; |
|---|
| 52 | |
|---|
| [2036] | 53 | |
|---|
| 54 | |
|---|
| 55 | }; |
|---|
| 56 | |
|---|
| 57 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.