SpawnRuleState Class
Runtime state for a spawn rule. More...
Declaration
Public Member Functions Index
| void | setSinceLastSpawn (float sinceLastSpawn) noexcept |
|
Sets the time since last spawn. More... | |
| float | sinceLastSpawn () const noexcept |
|
Returns the time since last spawn. More... | |
| void | update (const float deltaTime) noexcept |
|
Updates the state with the frame delta time. More... | |
Private Member Attributes Index
| float | sinceLastSpawn_ = 0.0f |
|
Time elapsed since the last spawn in seconds. More... | |
Description
Runtime state for a spawn rule.
SpawnRuleState tracks the runtime state associated with a SpawnRule, such as time since last spawn. This state is updated each frame and used by SpawnCondition to determine if spawning should occur.
- See Also
- See Also
Definition at line 21 of file SpawnRuleState.ixx.
Public Member Functions
setSinceLastSpawn()
| inline noexcept |
Sets the time since last spawn.
- Parameters
-
sinceLastSpawn Time in seconds.
Definition at line 35 of file SpawnRuleState.ixx.
Reference sinceLastSpawn.
Referenced by helios::engine::runtime::spawn::policy::conditions::RequestedAmountIsAvailableCondition::onCommit and helios::engine::runtime::spawn::policy::conditions::TimerSpawnCondition::onCommit.
sinceLastSpawn()
| inline nodiscard noexcept |
Returns the time since last spawn.
- Returns
Time in seconds since the last spawn.
Definition at line 44 of file SpawnRuleState.ixx.
Referenced by setSinceLastSpawn.
update()
| inline noexcept |
Updates the state with the frame delta time.
- Parameters
-
deltaTime Time elapsed since last frame in seconds.
Definition at line 53 of file SpawnRuleState.ixx.
Private Member Attributes
sinceLastSpawn_
|
Time elapsed since the last spawn in seconds.
Definition at line 26 of file SpawnRuleState.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.