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

#include <EnemyShootSystem.hpp>

Inheritance diagram for ECS::EnemyShootSystem:
ECS::System

Public Member Functions

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

◆ 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
componentsManagerThe component manager that the system will use to access components.
entityManagerThe entity manager that will be used to create entities.

◆ ~EnemyShootSystem()

ECS::EnemyShootSystem::~EnemyShootSystem ( )
default

Member Function Documentation

◆ 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
entityThe 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
sfmlThe 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: