#include <BonusSystem.hpp>
◆ 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
-
componentsManager | The ComponentManager that will be used to get the components of the entities. |
entityManager | The entity manager that the system will use to get entities. |
◆ ~BonusSystem()
ECS::BonusSystem::~BonusSystem |
( |
| ) |
|
|
default |
◆ checkIsValidEntity()
bool ECS::BonusSystem::checkIsValidEntity |
( |
Entity |
entity | ) |
|
|
virtual |
If the entity has a bonus component, then it's a valid entity
- Parameters
-
entity | The 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
-
clock | The 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
-
sfml | The 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: