Skip to main content

SpawnPlanCursor Struct

Tracks the current position within a spawn batch. More...

Declaration

struct helios::engine::runtime::spawn::types::SpawnPlanCursor { ... }

Public Member Attributes Index

const size_tspawnCount

Total number of entities to spawn in this batch. More...

const size_tposition

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.


The documentation for this struct was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.