SpawnAll Class
Spawns all inactive objects from a pool. More...
Declaration
Base class
| class | SpawnAmountProvider |
|
Abstract interface for determining spawn quantity. More... | |
Public Member Functions Index
| size_t | getAmount (const helios::engine::runtime::pooling::types::GameObjectPoolId gameObjectPoolId, const SpawnRuleState &spawnRuleState, const helios::engine::runtime::world::GameWorld &gameWorld, const helios::engine::runtime::world::UpdateContext &updateContext) const override |
|
Returns the number of entities to spawn. More... | |
Description
Spawns all inactive objects from a pool.
This provider queries the GameObjectPoolManager to determine how many inactive objects are available in the specified pool and returns that count as the spawn amount.
Useful for scenarios where all pooled objects should be spawned at once, such as initial wave spawning or respawning all enemies after a level reset.
Definition at line 32 of file SpawnAll.ixx.
Public Member Functions
getAmount()
| inline nodiscard virtual |
Returns the number of entities to spawn.
- Parameters
-
gameObjectPoolId The pool to spawn from.
spawnRuleState The rule's current runtime state.
gameWorld The game world in which the spawn occurs.
updateContext The current frame's context.
- Returns
Number of entities to spawn.
Definition at line 39 of file SpawnAll.ixx.
References helios::engine::runtime::pooling::GameObjectPoolSnapshot::inactiveCount, helios::engine::runtime::pooling::GameObjectPoolManager::poolSnapshot and helios::engine::runtime::world::GameWorld::tryManager.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.