SpawnPlanCursor Struct
Tracks the current position within a spawn batch. More...
Declaration
Public Member Attributes Index
| const size_t | spawnCount |
|
Total number of entities to spawn in this batch. More... | |
| const size_t | position |
|
Zero-based index of the current spawn within the batch. More... | |
Description
Tracks the current position within a spawn batch.
SpawnPlanCursor provides context to SpawnPlacer and SpawnInitializer about where the current spawn is within its batch. This enables behaviors like distributing spawns in a formation or applying sequential variations.
Example: ```cpp // Spawning 5 enemies in a row for (size_t i = 0; i < spawnCount; ++i) { SpawnPlanCursor cursor{.spawnCount = spawnCount, .position = i}; auto pos = placer->getPosition(guid, bounds, cursor, ctx); } ```
- See Also
SpawnPlacer
- See Also
SpawnInitializer
Definition at line 30 of file SpawnPlanCursor.ixx.
Public Member Attributes
position
|
Zero-based index of the current spawn within the batch.
Definition at line 40 of file SpawnPlanCursor.ixx.
Referenced by helios::engine::runtime::spawn::behavior::placements::AxisSpawnPlacer::getPosition, helios::engine::runtime::spawn::behavior::placements::ColumnSpawnPlacer::getPosition, helios::engine::runtime::spawn::behavior::placements::DistributedSpawnPlacer< N >::getPosition and helios::engine::runtime::spawn::behavior::initializers::DelayedComponentEnablerInitializer< ComponentTypes >::initialize.
spawnCount
|
Total number of entities to spawn in this batch.
Definition at line 35 of file SpawnPlanCursor.ixx.
Referenced by helios::engine::runtime::spawn::behavior::placements::AxisSpawnPlacer::getPosition, helios::engine::runtime::spawn::behavior::placements::ColumnSpawnPlacer::getPosition and helios::engine::runtime::spawn::behavior::placements::DistributedSpawnPlacer< N >::getPosition.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.