Last change
on this file since 3531 was
3531,
checked in by bensch, 19 years ago
|
orxonox/trunk: all WorldEntities/PWodes now destroy all date they alocate.
this is done with a virtual destructor:
if PNode is deleted it calls for the delete of the virtual destructor, and deletes the data of it.
|
File size:
636 bytes
|
Line | |
---|
1 | |
---|
2 | #ifndef _NPC_H |
---|
3 | #define _NPC_H |
---|
4 | |
---|
5 | #include "world_entity.h" |
---|
6 | |
---|
7 | class AI; |
---|
8 | |
---|
9 | class NPC : public WorldEntity { |
---|
10 | |
---|
11 | public: |
---|
12 | NPC (); |
---|
13 | ~NPC (); |
---|
14 | void destroy(void); |
---|
15 | |
---|
16 | /* collision control */ |
---|
17 | float collisionRadius; |
---|
18 | |
---|
19 | float xCor; |
---|
20 | float yCor; |
---|
21 | float zCor; |
---|
22 | |
---|
23 | void drawNPC(void); |
---|
24 | void paint(void); |
---|
25 | void setPosition(float x, float y, float z); |
---|
26 | void getPosition(float* x, float* y, float* z); |
---|
27 | void addAI(AI* ai); |
---|
28 | void setCollisionRadius(float r); |
---|
29 | float getCollisionRadius(void); |
---|
30 | int hit(void); |
---|
31 | void die(void); |
---|
32 | |
---|
33 | private: |
---|
34 | /* position of the non player space craft */ |
---|
35 | |
---|
36 | int npcType; |
---|
37 | int hasDied; |
---|
38 | |
---|
39 | |
---|
40 | ; |
---|
41 | |
---|
42 | }; |
---|
43 | |
---|
44 | #endif /* _NPC_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.