Removes enemies that left the screen on the left side.
More...
#include <systems/EnemyGarbageCollectorSystem.hpp>
|
| | EnemyGCSystem (busEvent &eventBus) |
| | Creates the system.
|
| |
|
void | onStart (rtk::ecs::Registry &) override |
| | Does nothing.
|
| |
| void | update (rtk::ecs::Registry ®, float) override |
| | Marks enemies with x below -100 as dead and publishes an event.
|
| |
|
void | onStop (rtk::ecs::Registry &) override |
| | Does nothing.
|
| |
Removes enemies that left the screen on the left side.
◆ EnemyGCSystem()
| rtk::systems::EnemyGCSystem::EnemyGCSystem |
( |
busEvent & | eventBus | ) |
|
|
inline |
Creates the system.
- Parameters
-
| eventBus | Bus on which EnemyEscapedEvent is published. |
◆ 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
-
| reg | Registry holding the enemies. |