1 #ifndef CORE_COMPONENTS_WANDERBEHAVIOR_HPP
2 #define CORE_COMPONENTS_WANDERBEHAVIOR_HPP
39 bl::tmap::Direction dir;
40 unsigned short int total;
41 unsigned short int steps;
54 enum State : std::uint8_t {
62 const sf::Vector2i origin;
63 const unsigned int radius;
Core classes and functionality for both the editor and game.
Adding this component to an entity allows it to be controlled.
Add this to an entity to make it spin in place.
AI behavior for standing in place facing a fixed direction.
Add this component to an entity to make it wander around.
WanderBehavior(unsigned int radius, const sf::Vector2i &origin)
Construct a new Wander Behavior component.
void update(bl::tmap::Position &position, Controllable &controller, float dt)
Updates the entity and wanders around.