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

#include <BonusSystem.hpp>

Inheritance diagram for ECS::BonusSystem:
ECS::System

Public Member Functions

 BonusSystem (const std::shared_ptr< ComponentManager > &componentsManager, const std::shared_ptr< EntityManager > &entityManager)
 
 ~BonusSystem ()=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

◆ BonusSystem()

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

It's the constructor for the BonusSystem class.

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

◆ ~BonusSystem()

ECS::BonusSystem::~BonusSystem ( )
default

Member Function Documentation

◆ checkIsValidEntity()

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

If the entity has a bonus component, then it's a valid entity

Parameters
entityThe entity to check
Returns
A boolean value.

Implements ECS::System.

◆ setClock()

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

This function sets the clock for the bonus system.

Parameters
clockThe clock that will be used to determine when the bonus should be removed.

◆ setSfml()

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

It sets the _sfml variable to the sfml variable

Parameters
sfmlThe sfml object that will be used to draw the bonus.

◆ update()

void ECS::BonusSystem::update ( )
virtual

It creates a bonus entity if there are less than 3 bonus entities on the screen

Implements ECS::System.


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