Last change
on this file since 3542 was
3531,
checked in by bensch, 20 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:
516 bytes
|
Line | |
---|
1 | #ifndef _PRIMITIVE_H |
---|
2 | #define _PRIMITIVE_H |
---|
3 | |
---|
4 | #include "world_entity.h" |
---|
5 | |
---|
6 | typedef enum PRIMITIVE_FORM {PSPHERE = 0, PCUBE, PSQUARE}; |
---|
7 | |
---|
8 | class Primitive : public WorldEntity |
---|
9 | { |
---|
10 | friend class World; |
---|
11 | |
---|
12 | public: |
---|
13 | Primitive (PRIMITIVE_FORM form); |
---|
14 | virtual ~Primitive (); |
---|
15 | void destroy(void); |
---|
16 | |
---|
17 | virtual void tick (float time); |
---|
18 | virtual void hit (WorldEntity* weapon, Vector loc); |
---|
19 | virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); |
---|
20 | virtual void draw (); |
---|
21 | |
---|
22 | }; |
---|
23 | |
---|
24 | #endif /* _PRIMITIVE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.