9 #ifndef _TurtleBrains_Entity_h_
10 #define _TurtleBrains_Entity_h_
12 #include "../core/tb_string.h"
13 #include "../graphics/tb_graphic_list.h"
14 #include "../math/unstable/tbu_bounding_volume.h"
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.h:47
void PushBehavior(EntityBehaviorInterface *entityBehavior)
bool IsEntityOfType(const EntityType &entityType) const
Definition: tb_entity.h:46
Definition: tb_graphic_list.h: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.h:25
EntityManager * GetEntityManager(void) const
std::list< EntityType > EntityTypeContainer
Definition: tb_entity.h:35
virtual void OnCollide(const Entity &other)
Definition: tb_tile_system.h:90
void AddEntityType(const EntityType &entityType)
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
static Vector2 Zero(void)
Definition: tb_vector.h:53
Definition: tb_entity_manager.h:32
void SetCollidable(const bool isCollidable)
tbCore::tbString EntityType
Definition: tb_entity.h: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.h: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.h:335
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...