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

#include <GraphicSystem.hpp>

Inheritance diagram for ECS::GraphicSystem:
ECS::System

Public Member Functions

 GraphicSystem (const std::shared_ptr< ComponentManager > &componentsManager, const std::shared_ptr< EntityManager > &entityManager)
 
 ~GraphicSystem ()=default
 
void update ()
 
void setSfml (std::shared_ptr< InitSfml > sfml)
 
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

◆ GraphicSystem()

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

It's a constructor for the GraphicSystem class

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

◆ ~GraphicSystem()

ECS::GraphicSystem::~GraphicSystem ( )
default

Member Function Documentation

◆ checkIsValidEntity()

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

If the entity has a position, rotation, and texture component, then it's a valid entity

Parameters
entityThe entity to check
Returns
A boolean value.

Implements ECS::System.

◆ setClock()

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

This function sets the clock for the GraphicSystem

Parameters
clockThe clock that will be used to calculate the delta time.

◆ setSfml()

void ECS::GraphicSystem::setSfml ( std::shared_ptr< InitSfml sfml)

It sets the sfml pointer to the one passed in

Parameters
sfmlThe InitSfml class that is used to initialize the SFML library.

◆ update()

void ECS::GraphicSystem::update ( )
virtual

It takes all the entities that have a graphic component, and draws them on the screen

Implements ECS::System.


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