Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | List of all members
core::system::Movement Class Reference

Primary System for managing entity movement and interpolation. More...

#include <Movement.hpp>

+ Inheritance diagram for core::system::Movement:

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...
 

Detailed Description

Primary System for managing entity movement and interpolation.

Definition at line 21 of file Movement.hpp.

Constructor & Destructor Documentation

◆ Movement()

core::system::Movement::Movement ( Systems owner)

Create the movement system.

Parameters
ownerThe primary systems object

Definition at line 11 of file Movement.cpp.

◆ ~Movement()

virtual core::system::Movement::~Movement ( )
virtualdefault

Destroys the system.

Member Function Documentation

◆ makeMovable()

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.

Parameters
entityThe entity to make movable
moveSpeedThe speed to move at
fastMoveSpeedThe speed to move at when moving fast
Returns
True if a component was added, false otherwise

Definition at line 19 of file Movement.cpp.

◆ moveEntity()

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.

Parameters
entityThe entity to move
directionThe direction to move in
fastTrue to move at the fast speed, false for slow
Returns
True if the movement is possible, false if no movement will occur

Definition at line 27 of file Movement.cpp.


The documentation for this class was generated from the following files: