![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Add this component to an entity to make it wander around. More...
#include <WanderBehavior.hpp>
Public Member Functions | |
WanderBehavior (unsigned int radius, const sf::Vector2i &origin) | |
Construct a new Wander Behavior component. More... | |
void | update (bl::tmap::Position &position, Controllable &controller, float dt) |
Updates the entity and wanders around. More... | |
Add this component to an entity to make it wander around.
Definition at line 18 of file WanderBehavior.hpp.
core::component::WanderBehavior::WanderBehavior | ( | unsigned int | radius, |
const sf::Vector2i & | origin | ||
) |
Construct a new Wander Behavior component.
radius | The radius to stay within, in tiles |
origin | The starting position, in tiles |
Definition at line 10 of file WanderBehavior.cpp.
void core::component::WanderBehavior::update | ( | bl::tmap::Position & | position, |
Controllable & | controller, | ||
float | dt | ||
) |
Updates the entity and wanders around.
position | The position of the entity |
controller | The controllable of the entity |
dt | Time elapsed, in seconds |
Definition at line 19 of file WanderBehavior.cpp.