R-TYPE
Public Member Functions | List of all members
ECS::MoveSystem Class Reference

#include <MoveSystem.hpp>

Inheritance diagram for ECS::MoveSystem:
ECS::System

Public Member Functions

 MoveSystem (const std::shared_ptr< ComponentManager > &componentsManager, const std::shared_ptr< EntityManager > &entityManager)
 
 ~MoveSystem ()=default
 
void update ()
 
void setClock (std::shared_ptr< Clock > clock)
 
bool checkIsValidEntity (Entity entity)
 
- Public Member Functions inherited from ECS::System
 System (const std::shared_ptr< ComponentManager > &componentManager, const std::shared_ptr< EntityManager > &entityManager)
 
 ~System ()=default
 

Additional Inherited Members

- Protected Attributes inherited from ECS::System
std::shared_ptr< ComponentManager_componentManager
 
std::shared_ptr< EntityManager_entityManager
 

Constructor & Destructor Documentation

◆ MoveSystem()

ECS::MoveSystem::MoveSystem ( const std::shared_ptr< ComponentManager > &  componentsManager,
const std::shared_ptr< EntityManager > &  entityManager 
)

It's a constructor for the MoveSystem class

Parameters
componentsManagerThe ComponentManager that the system will use to get components from.
entityManagerThe entity manager that the system will use to get entities.

◆ ~MoveSystem()

ECS::MoveSystem::~MoveSystem ( )
default

Member Function Documentation

◆ checkIsValidEntity()

bool ECS::MoveSystem::checkIsValidEntity ( Entity  entity)
virtual

If the entity has a position, speed, and acceleration component, then it's a valid entity

Parameters
entityThe entity to check
Returns
A boolean value.

Implements ECS::System.

◆ setClock()

void ECS::MoveSystem::setClock ( std::shared_ptr< Clock clock)

This function sets the clock for the MoveSystem.

Parameters
clockA pointer to the clock that the system will use to determine how much time has passed since the last update.

◆ update()

void ECS::MoveSystem::update ( )
virtual

It gets the entities to update from the clock, then it checks if the entity has the required components, and if it does, it updates the position of the entity

Implements ECS::System.


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