Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3620 in orxonox.OLD for orxonox/trunk/src/story_entities/world.h


Ignore:
Timestamp:
Mar 21, 2005, 5:37:58 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: added worldinterface, to enable all worldentities to access the entities list. so they can add entities themselfes. this is a nice hack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.h

    r3608 r3620  
    1212#include "p_node.h"
    1313
     14
     15class World;
     16class WorldEntity;
     17
     18//! The game world Interface
     19/**
     20   this is a singleton interface, that enables world_entities to access the
     21   world. for those objects, there is no easier way than over this interface!
     22*/
     23class WorldInterface : BaseObject {
     24
     25 public:
     26  ~WorldInterface();
     27  static WorldInterface* getInstance();
     28  void init(World* world);
     29  tList<WorldEntity>* getEntityList();
     30
     31 private:
     32  WorldInterface();
     33  static WorldInterface* singletonRef;    //!< singleton reference to this object
     34  bool worldIsInitialized;                //!< true if the world has been initialized
     35  World* worldReference;                  //!< this is a reference to the running world
     36
     37};
     38
     39
    1440class TrackManager;
    15 class WorldEntity;
    1641class Camera;
    1742class PNode;
     
    5075  /* command node functions */
    5176  bool command (Command* cmd);
     77
     78  tList<WorldEntity>* getEntities();
    5279
    5380  /* interface to world */
Note: See TracChangeset for help on using the changeset viewer.