![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Primary System for managing entity movement and interpolation. More...
#include <Movement.hpp>
Public Member Functions | |
Movement (Systems &owner) | |
Create the movement system. More... | |
virtual | ~Movement ()=default |
Destroys the system. More... | |
bool | makeMovable (bl::ecs::Entity entity, float moveSpeed, float fastMoveSpeed) |
Adds a Movable component to the given entity if it does not already exist. More... | |
bool | moveEntity (bl::ecs::Entity entity, bl::tmap::Direction direction, bool fast) |
Moves an entity in the given direction using either its fast or slow speed. More... | |
Primary System for managing entity movement and interpolation.
Definition at line 21 of file Movement.hpp.
core::system::Movement::Movement | ( | Systems & | owner | ) |
Create the movement system.
owner | The primary systems object |
Definition at line 11 of file Movement.cpp.
|
virtualdefault |
Destroys the system.
bool core::system::Movement::makeMovable | ( | bl::ecs::Entity | entity, |
float | moveSpeed, | ||
float | fastMoveSpeed | ||
) |
Adds a Movable component to the given entity if it does not already exist.
entity | The entity to make movable |
moveSpeed | The speed to move at |
fastMoveSpeed | The speed to move at when moving fast |
Definition at line 19 of file Movement.cpp.
bool core::system::Movement::moveEntity | ( | bl::ecs::Entity | entity, |
bl::tmap::Direction | direction, | ||
bool | fast | ||
) |
Moves an entity in the given direction using either its fast or slow speed.
entity | The entity to move |
direction | The direction to move in |
fast | True to move at the fast speed, false for slow |
Definition at line 27 of file Movement.cpp.