9 #ifndef _TurtleBrains_EntityManager_h_
10 #define _TurtleBrains_EntityManager_h_
12 #include "tb_entity.h"
13 #include "../core/tb_noncopyable.h"
205 virtual void OnUpdate(
const float deltaTime)
override;
209 void SafeToRemoveEntities(
void);
211 typedef std::set<EntityInterface*> EntitySet;
212 typedef std::map<EntityType, EntityList> EntityByTypeMap;
214 EntityList mEntities;
215 EntityList mManagedEntities;
216 EntitySet mEntitiesToRemove;
217 EntityByTypeMap mEntitiesByType;
Definition: tb_vector.h:48
Definition: tb_entity.h:39
Definition: tb_graphic_list.h:25
void AddEntity(EntityInterface *entity)
Entity * CreateEntityByType(const EntityType &entityType)
std::list< EntityInterface * > EntityList
Definition: tb_entity_manager.h:120
EntityList GetAllEntities(void)
void RemoveEntity(EntityInterface *entity)
Definition: tb_noncopyable.h:22
Contains all functions, classes and helpers related to game/application development written by Tim "B...
Definition: tb_application_dialog.h:21
virtual void OnUpdate(const float deltaTime) override
Definition: tb_entity_manager.h:114
void RemoveEntities(const EntityType &byType=Entity::kInvalidType)
tbCore::tbString EntityType
Definition: tb_entity.h:28
EntityFactoryInterface(void)
static const EntityType kInvalidType
Definition: tb_entity.h:46
Definition: tb_entity_manager.h:30
EntityList GetEntitiesWithin(const tbMath::Vector2 ¢er, const float radius, const EntityType &byType=Entity::kInvalidType, bool onlyCollidableEntities=false)
EntityList GetEntitiesByType(const EntityType &byType)
bool DestroyEntity(Entity *entityToDestroy)
virtual ~EntityFactoryInterface(void)
EntityList GetEntitiesAt(const tbMath::Vector2 &point, const EntityType &byType=Entity::kInvalidType, bool onlyCollidableEntities=false)
virtual ~EntityManager(void)=0
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...