R-Type 0.1
Loading...
Searching...
No Matches
rtk::systems::EnemyGCSystem Class Referencefinal

Removes enemies that left the screen on the left side. More...

#include <systems/EnemyGarbageCollectorSystem.hpp>

Inheritance diagram for rtk::systems::EnemyGCSystem:
[legend]

Public Member Functions

 EnemyGCSystem (busEvent &eventBus)
 Creates the system.
 
void onStart (rtk::ecs::Registry &) override
 Does nothing.
 
void update (rtk::ecs::Registry &reg, float) override
 Marks enemies with x below -100 as dead and publishes an event.
 
void onStop (rtk::ecs::Registry &) override
 Does nothing.
 

Detailed Description

Removes enemies that left the screen on the left side.

Constructor & Destructor Documentation

◆ EnemyGCSystem()

rtk::systems::EnemyGCSystem::EnemyGCSystem ( busEvent & eventBus)
inline

Creates the system.

Parameters
eventBusBus on which EnemyEscapedEvent is published.

Member Function Documentation

◆ update()

void rtk::systems::EnemyGCSystem::update ( rtk::ecs::Registry & reg,
float  )
inlineoverride

Marks enemies with x below -100 as dead and publishes an event.

Parameters
regRegistry holding the enemies.