#include <EnemyShootSystem.hpp>
◆ EnemyShootSystem()
ECS::EnemyShootSystem::EnemyShootSystem |
( |
const std::shared_ptr< ComponentManager > & |
componentsManager, |
|
|
const std::shared_ptr< EntityManager > & |
entityManager |
|
) |
| |
It's the constructor for the EnemyShootSystem class.
- Parameters
-
componentsManager | The component manager that the system will use to access components. |
entityManager | The entity manager that will be used to create entities. |
◆ ~EnemyShootSystem()
ECS::EnemyShootSystem::~EnemyShootSystem |
( |
| ) |
|
|
default |
◆ checkIsValidEntity()
bool ECS::EnemyShootSystem::checkIsValidEntity |
( |
Entity |
entity | ) |
|
|
virtual |
If the entity has a speed, health, sprite, and position component, then it's a valid entity
- Parameters
-
entity | The entity to check |
- Returns
- A boolean value.
Implements ECS::System.
◆ setClock()
void ECS::EnemyShootSystem::setClock |
( |
std::shared_ptr< Clock > |
clock | ) |
|
◆ setSfml()
void ECS::EnemyShootSystem::setSfml |
( |
std::shared_ptr< InitSfml > |
sfml | ) |
|
It sets the sfml pointer to the one passed in
- Parameters
-
sfml | The InitSfml class that is used to initialize the SFML library. |
◆ update()
void ECS::EnemyShootSystem::update |
( |
| ) |
|
|
virtual |
It creates a new entity of type PROJECTILE, adds a position, health, sprite and speed component to it, and then sets the position of the projectile to the position of the enemy
Implements ECS::System.
The documentation for this class was generated from the following files: