Simple C++ Game
|
A system for updating positions based on velocities. More...
#include <VelocitySystem.hpp>
Public Member Functions | |
VelocitySystem () | |
Construct a new VelocitySystem. | |
![]() | |
IteratingSystem () | |
Construct a new IteratingSystem with the default EntitySystem constructor. More... | |
IteratingSystem (const std::shared_ptr< EntityFamily > &family) | |
Construct a new IteratingSystem with the EntityFamily EntitySystem constructor. More... | |
void | update (const sf::Time deltaTime) |
Iterates through each element in the system to perform updates. More... | |
![]() | |
EntitySystem () | |
Construct a new default EntitySystem. More... | |
EntitySystem (const std::shared_ptr< EntityFamily > &family) | |
Construct a new EntitySystem that acts on a specified family. More... | |
virtual void | engineEntityAdded (const std::shared_ptr< Entity > &entity) |
Performs any operations required after an entity has been added to an EntityEngine the system is a part of. More... | |
Protected Member Functions | |
void | process (std::shared_ptr< Entity > &entity, sf::Time deltaTime) |
Updates position data based on velocity for an Entity. More... | |
![]() | |
virtual std::map< int, std::shared_ptr< Entity > > | getEntities () const |
Get the Entities in the system. More... | |
A system for updating positions based on velocities.
It acts on entities with LocationComponent and VelocityComponent
|
protectedvirtual |
Updates position data based on velocity for an Entity.
entity | The current entity being processed |
deltaTime | The amount of time that has passed since process() was last called on this entity |
Implements IteratingSystem.