Last change
on this file since 3302 was
3229,
checked in by patrick, 20 years ago
|
orxonox/trunk: unstable - WorldEntity cleaned
|
File size:
1.3 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file world_entity.h |
---|
3 | \brief Definition of the basic WorldEntity |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _WORLD_ENTITY_H |
---|
7 | #define _WORLD_ENTITY_H |
---|
8 | |
---|
9 | #include "stdincl.h" |
---|
10 | |
---|
11 | class CollisionCluster; |
---|
12 | |
---|
13 | //! Basic class from which all interactive stuff in the world is derived from |
---|
14 | class WorldEntity |
---|
15 | { |
---|
16 | friend class World; |
---|
17 | |
---|
18 | public: |
---|
19 | WorldEntity (bool isFree = false); |
---|
20 | virtual ~WorldEntity (); |
---|
21 | |
---|
22 | Location* getLocation (); |
---|
23 | Placement* getPlacement (); |
---|
24 | void setCollision (CollisionCluster* newhull); |
---|
25 | |
---|
26 | bool isFree (); |
---|
27 | |
---|
28 | //void addAbility(Ability* ability); |
---|
29 | //void removeAbility(Ability* ability); |
---|
30 | |
---|
31 | virtual void postSpawn (); |
---|
32 | virtual void tick (float time); |
---|
33 | virtual void hit (WorldEntity* weapon, Vector loc); |
---|
34 | virtual void destroy (); |
---|
35 | virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); |
---|
36 | virtual void command (Command* cmd); |
---|
37 | |
---|
38 | virtual void draw (); |
---|
39 | virtual void getLookat (Location* locbuf); |
---|
40 | |
---|
41 | virtual void leftWorld (); |
---|
42 | |
---|
43 | private: |
---|
44 | const bool bFree; |
---|
45 | bool bCollide; |
---|
46 | bool bDraw; |
---|
47 | |
---|
48 | WorldEntity* owner; |
---|
49 | CollisionCluster* collisioncluster; |
---|
50 | Placement place; |
---|
51 | Location loc; |
---|
52 | |
---|
53 | void init( Location* spawnloc, WorldEntity* spawnowner); |
---|
54 | void init( Placement* spawnplc, WorldEntity* spawnowner); |
---|
55 | }; |
---|
56 | |
---|
57 | #endif /* _WORLD_ENTITY_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.