#include <tb_entity_behavior_interface.h>
Public Member Functions | |
MoveBehavior (Entity &entity, const tbMath::Vector2 &velocity) | |
virtual | ~MoveBehavior (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 MoveBehavior is a behavior that will move an Entity at a constant rate and direction.
|
inline |
Creates a MoveBehavior that will move by the rate and direction specified by the velocity vector.
entity | The entity that will be controlled and moving during this behavior. |
velocity | The direction and speed which the entity will be moving at, by default this speed is in pixels per second unless the projection or view matrix has changed. |
|
inlinevirtual |
Cleans up after the MoveBehavior, which doesn't involve a whole lot.
|
virtual |
Moves the entity by the velocity within the given fixed-time step.
Reimplemented from TurtleBrains::Game::EntityBehaviorInterface.