![]() |
R-Type
2
Doom but in better
|
Go to the source code of this file.
Functions | |
void | lifetime_system (Registry &r, ComponentContainer< Lifetime > &lifetimes) |
Manages the lifetime of entities by decreasing their time left. | |
void lifetime_system | ( | Registry & | r, |
ComponentContainer< Lifetime > & | lifetimes ) |
Manages the lifetime of entities by decreasing their time left.
This function handles the expiration of entities based on their lifetime. It updates the Lifetime
component of each entity by decreasing the time_left
value based on the time passed (delta_time
). If an entity's lifetime expires (i.e., time_left
reaches zero or below), it may be removed or marked for destruction.
r | The Registry that contains all game entities and their components. |
lifetimes | The container of the component Lifetime . |
Definition at line 6 of file LifetimeSystem.cpp.