GameObjectLifecycleSystem Class
Reacts to HealthDepletedEvents and despawns or deactivates entities. More...
Declaration
Public Member Typedefs Index
| using | EngineRoleTag = helios::engine::common::tags::SystemRole |
Public Member Functions Index
| void | update (helios::engine::runtime::world::UpdateContext &updateContext) noexcept |
|
Processes health depletion events and enqueues despawn commands. More... | |
Description
Reacts to HealthDepletedEvents and despawns or deactivates entities.
Reads HealthDepletedEvents from the phase bus. For each affected entity, the system inspects the HealthComponent's HealthDepletedBehavior flags:
- If Despawn is set and the entity has a SpawnedByProfileComponent, a DespawnCommand is enqueued.
- Otherwise the entity is deactivated.
Definition at line 57 of file GameObjectLifecycleSystem.ixx.
Public Member Typedefs
EngineRoleTag
|
Definition at line 61 of file GameObjectLifecycleSystem.ixx.
Public Member Functions
update()
| inline noexcept |
Processes health depletion events and enqueues despawn commands.
- Parameters
-
updateContext Current frame context.
Definition at line 68 of file GameObjectLifecycleSystem.ixx.
References helios::engine::mechanics::health::types::Despawn and helios::engine::mechanics::health::types::hasHealthDepletedFlag.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.