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);
278 virtual void OnUpdate(
const float deltaTime);
303 void ReallyPopBehavior(
void);
305 typedef std::stack<EntityBehaviorInterface*> BehaviorContainer;
306 typedef std::pair<tbMath::Unstable::BoundingVolume, tbMath::Vector2> BoundingVolumeInformation;
307 typedef std::vector<BoundingVolumeInformation> BoundingVolumeContainer;
309 BehaviorContainer mBehaviorStack;
310 BoundingVolumeContainer mBoundingVolumes;
311 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)
void AddBoundingBox(const float boxWidth, const float boxHeight, const tbMath::Vector2 ¢erOffset=tbMath::Vector2::Zero())
Definition: tb_entity_behavior_interface.h:25
EntityManager * GetEntityManager(void) const
std::list< EntityType > EntityTypeContainer
Definition: tb_entity.h:35
void AddEntityType(const EntityType &entityType)
virtual void OnCollideWith(Entity &other)
Contains all functions, classes and helpers related to game/application development written by Tim "B...
Definition: tb_application_dialog.h:21
static Vector2 Zero(void)
Definition: tb_vector.h:53
virtual void OnRemoved(void)
Definition: tb_entity_manager.h:123
void RemoveBoundingVolumes(void)
void SetCollidable(const bool isCollidable)
tbCore::tbString EntityType
Definition: tb_entity.h:30
bool HasBoundingVolume(void) const
void RemoveEntityType(const EntityType &entityType)
virtual void OnRender(void) const
static const EntityType kInvalidType
Definition: tb_entity.h:53
virtual void OnAdded(void)
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)
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...