/*! * @file entity_manager.h * Manages creation and destruction of entities */ #ifndef _ENTITY_MANGER #define _ENTITY_MANAGER /* include this file, it contains some default definitions */ #include "netdefs.h" /* include synchronizeable.h since this class is derived from this one */ #include "synchronizeable.h" /*! * a class that can create and remove entities */ class EntityManager: public Synchronizeable { public: EntityManager(); ~EntityManager(); virtual void writeBytes(const byte* data, int length); virtual int readBytes(byte* data, int maxLength, int * reciever); virtual void writeDebug() const; virtual void readDebug() const; void createEntity(int classID); void removeEntity(int uniqueID); private: void requestCreateEntity(int classID); void requestRemoveEntity(int uniqueID); void executeCreateEntity(int classID); void executeRemoveEntity(int uniqueID); bool canCreateEntity(int classID); }; #endif /*_ENTITY_MANGER*/