|
R-Type
Distributed multiplayer game engine in C++
|
System managing entity health, invincibility and death. More...
#include <HealthSystem.hpp>


Public Member Functions | |
| HealthSystem ()=default | |
| Default constructor. | |
| ~HealthSystem () override=default | |
| Default destructor. | |
| void | update (Registry ®istry, float deltaTime) override |
| Updates health-related logic for all entities. | |
| ComponentMask | getComponentMask () const override |
| Gets the component mask for this system. | |
Public Member Functions inherited from ecs::ISystem | |
| virtual | ~ISystem ()=default |
| Virtual destructor. | |
System managing entity health, invincibility and death.
Decrements invincibility timers, handles entity destruction when health reaches zero, and manages health-related game logic. Requires Health component.
Definition at line 23 of file HealthSystem.hpp.
|
default |
Default constructor.
|
overridedefault |
Default destructor.
|
overridevirtual |
Gets the component mask for this system.
Implements ecs::ISystem.
Definition at line 46 of file HealthSystem.cpp.
Referenced by update().
|
overridevirtual |
Updates health-related logic for all entities.
Updates health states and processes entity deaths.
Performs the following operations:
| registry | Reference to the ECS registry |
| deltaTime | Time elapsed since last frame (in seconds) |
Implements ecs::ISystem.
Definition at line 16 of file HealthSystem.cpp.
References ecs::Registry::getComponent(), getComponentMask(), ecs::Registry::getEntitiesWithMask(), ecs::Health::getInvincibilityTimer(), ecs::Registry::hasComponent(), ecs::Killed, and ecs::Registry::setComponent().
