9 #ifndef _TurtleBrains_EntityManager_h_
10 #define _TurtleBrains_EntityManager_h_
12 #include "tb_entity.h"
13 #include "../core/tb_noncopyable.h"
140 virtual void OnUpdate(
const float deltaTime)
override;
143 void ReallyAddEntity(
Entity* entity,
bool managed);
144 void ReallyRemoveEntity(
Entity* entityToRemove);
145 void ReallyRemoveMarkedEntities(
void);
147 typedef std::set<Entity*> EntitySet;
148 typedef std::map<EntityType, EntityList> EntityByTypeMap;
150 EntityList mEntities;
151 EntityList mManagedEntities;
152 EntitySet mEntitiesToRemove;
153 EntityByTypeMap mEntitiesByType;
154 bool mIsSafeToRemove;
Definition: tb_vector.h:47
Definition: tb_entity.h:46
void AddEntity(Entity *entity)
Definition: tb_graphic_list.h:27
EntityList GetAllEntities(void)
std::list< EntityType > EntityTypeContainer
Definition: tb_entity.h:35
std::list< Entity * > EntityList
Definition: tb_entity_manager.h:38
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
virtual void OnUpdate(const float deltaTime) override
Definition: tb_entity_manager.h:32
void RemoveEntities(const EntityType &byType=Entity::kInvalidType)
tbCore::tbString EntityType
Definition: tb_entity.h:30
static const EntityType kInvalidType
Definition: tb_entity.h:53
EntityList GetEntitiesWithin(const tbMath::Vector2 ¢er, const float radius, const EntityType &byType=Entity::kInvalidType, bool onlyCollidableEntities=false)
EntityList GetEntitiesByType(const EntityType &byType)
void EntityTypeChanged(Entity &entity, const EntityTypeContainer &oldTypes)
EntityList GetEntitiesAt(const tbMath::Vector2 &point, const EntityType &byType=Entity::kInvalidType, bool onlyCollidableEntities=false)
void RemoveEntity(Entity *entity)
virtual ~EntityManager(void)=0
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...