Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/old.chris/src/world_entity.h @ 3574

Last change on this file since 3574 was 2194, checked in by chris, 20 years ago

orxonox/branches/chris: Implemented is_a() query for WorldEntities

File size: 1.4 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
11class CollisionCluster;
12
13//! Basic class from which all interactive stuff in the world is derived from
14class WorldEntity
15{       
16        friend class World;
17
18 public:
19  WorldEntity (bool isFree = false);
20  ~WorldEntity ();
21
22        Location* get_location ();
23        Placement* get_placement ();
24        void set_collision (CollisionCluster* newhull);
25
26        bool isFree ();
27
28        static bool is_a(char* name);
29       
30  //void addAbility(Ability* ability);
31  //void removeAbility(Ability* ability);
32
33        virtual void post_spawn ();
34  virtual void tick (float time);
35  virtual void hit (Damage* dmg, WorldEntity* instigator, Uint32 hitflags);
36  virtual void destroy ();
37  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
38        virtual void command (Command* cmd);
39   
40  virtual void draw ();
41  virtual void get_lookat (Location* locbuf);
42
43        virtual void left_world ();
44       
45 private:
46        static bool is_none (char* name);       
47        static bool (*basefunc)(char*);
48        static char *is;
49 
50  const bool bFree;     
51  bool bCollide;
52  bool bDraw;
53 
54        WorldEntity* owner;
55        CollisionCluster* collisioncluster;
56        Placement place;
57        Location loc;
58
59        void init( Location* spawnloc, WorldEntity* spawnowner);
60        void init( Placement* spawnplc, WorldEntity* spawnowner);
61};
62
63#endif
Note: See TracBrowser for help on using the repository browser.