9 #ifndef TurtleBrains_EntityManager_hpp
10 #define TurtleBrains_EntityManager_hpp
12 #include <turtle_brains/game/tb_entity.hpp>
13 #include <turtle_brains/core/tb_noncopyable.hpp>
146 virtual void OnUpdate(
const float deltaTime)
override;
149 void ReallyAddEntity(
Entity* entity,
bool managed);
150 void ReallyRemoveEntity(
Entity* entityToRemove);
151 void ReallyRemoveMarkedEntities(
void);
153 typedef std::set<Entity*> EntitySet;
154 typedef std::map<EntityType, EntityList> EntityByTypeMap;
156 EntityList mEntities;
157 EntityList mManagedEntities;
158 EntitySet mEntitiesToRemove;
159 EntityByTypeMap mEntitiesByType;
160 bool mIsSafeToRemove;
Definition: tb_vector.hpp:48
Definition: tb_entity.hpp:46
void AddEntity(Entity *entity)
Definition: tb_graphic_list.hpp:27
EntityList GetAllEntities(void)
std::list< EntityType > EntityTypeContainer
Definition: tb_entity.hpp:35
std::list< Entity * > EntityList
Definition: tb_entity_manager.hpp:38
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
virtual void OnSimulate(void)
virtual void OnUpdate(const float deltaTime) override
Definition: tb_entity_manager.hpp:32
void RemoveEntities(const EntityType &byType=Entity::kInvalidType)
tbCore::tbString EntityType
Definition: tb_entity.hpp:30
static const EntityType kInvalidType
Definition: tb_entity.hpp: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...