#include <tb_entity_behavior_interface.h>
Public Member Functions | |
DelayBehavior (Entity &entity, const tbGame::GameTimer &delayTimer) | |
virtual | ~DelayBehavior (void) |
virtual void | OnSimulate (void) |
![]() | |
EntityBehaviorInterface (Entity &entity) | |
virtual | ~EntityBehaviorInterface (void)=0 |
Additional Inherited Members | |
![]() | |
virtual void | OnAdded (void) |
virtual void | OnRemoved (void) |
virtual void | OnPaused (void) |
virtual void | OnResume (void) |
virtual void | OnUpdate (const float deltaTime) |
virtual void | OnRender (void) const |
virtual void | OnCollideWith (const Entity &other) |
![]() | |
Entity & | mEntity |
The DelayBehavior is a simple behavior that, while active, counts down a delay timer and pops the behavior off the entity's behavior stack once the timer reaches zero.
|
inline |
Constructs a DelayBehavior for the entity.
entity | The entity which this behavior will be "controlling". |
delayTimer | The amount of time to delay before popping the action off the entities stack. |
|
inlinevirtual |
Destructs the DelayBehavior.
|
virtual |
Decrements the delay timer and if it reaches zero, pops the behavior off the entity's behavior stack.
Reimplemented from TurtleBrains::Game::EntityBehaviorInterface.