9 #ifndef TurtleBrains_Entity_hpp
10 #define TurtleBrains_Entity_hpp
12 #include <turtle_brains/core/tb_string.hpp>
13 #include <turtle_brains/graphics/tb_graphic_list.hpp>
14 #include <turtle_brains/math/unstable/tbu_bounding_volume.hpp>
59 explicit Entity(
const EntityType& entityType);
303 virtual void OnUpdate(
const float deltaTime);
324 virtual void OnAdd(
void);
333 void ReallyPopBehavior(
void);
334 void DeleteDelayedBehaviors(
void);
336 typedef std::stack<EntityBehaviorInterface*> BehaviorStack;
337 typedef std::list<EntityBehaviorInterface*> BehaviorList;
338 typedef std::pair<tbMath::Unstable::BoundingVolume, tbMath::Vector2> BoundingVolumeInformation;
339 typedef std::vector<BoundingVolumeInformation> BoundingVolumeContainer;
341 BehaviorStack mBehaviorStack;
342 BehaviorList mBehaviorsToDelete;
343 BoundingVolumeContainer mBoundingVolumes;
344 EntityTypeContainer mEntityTypes;
Definition: tb_vector.hpp:48
void PushBehavior(EntityBehaviorInterface *entityBehavior)
bool IsEntityOfType(const EntityType &entityType) const
Definition: tb_entity.hpp:46
Definition: tb_graphic_list.hpp:27
void PopBehaviorIf(EntityBehaviorInterface *entityBehavior)
void AddBoundingCircle(const float circleRadius, const tbMath::Vector2 ¢erOffset=tbMath::Vector2::Zero())
virtual void OnSimulate(void)
virtual void OnDebugRender(void) const
void AddBoundingBox(const float boxWidth, const float boxHeight, const tbMath::Vector2 ¢erOffset=tbMath::Vector2::Zero())
void ClearBoundingVolumes(void)
Definition: tb_entity_behavior_interface.hpp:24
EntityManager * GetEntityManager(void) const
std::list< EntityType > EntityTypeContainer
Definition: tb_entity.hpp:35
virtual void OnCollide(const Entity &other)
Definition: tb_tile_system.hpp:90
void AddEntityType(const EntityType &entityType)
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
static Vector2 Zero(void)
Definition: tb_vector.hpp:54
Definition: tb_entity_manager.hpp:32
void SetCollidable(const bool isCollidable)
tbCore::tbString EntityType
Definition: tb_entity.hpp:30
void ClearBehaviors(void)
bool HasBoundingVolume(void) const
void RemoveEntityType(const EntityType &entityType)
virtual void OnRender(void) const
static const EntityType kInvalidType
Definition: tb_entity.hpp:53
const EntityBehaviorInterface * GetActiveBehavior(void) const
bool CheckCollisionWith(const tbMath::Vector2 &point) const
const EntityTypeContainer & GetEntityTypes(void) const
bool IsCollidable(void) const
virtual void OnUpdate(const float deltaTime)
virtual void OnRemove(void)
Entity(const EntityType &entityType)
const EntityType & GetEntityType(void) const
void PopAllBehaviors(void)
std::string tbString
Definition: tb_string.hpp:335
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...