placements Folder
Files Index
| file | helios/engine/runtime/spawn/behavior/placements/_module.ixx |
|
Aggregate module for helios::engine::runtime::spawn::behavior::placements namespace. More... | |
| file | AxisSpawnPlacer.ixx |
|
Spawn placer that arranges entities along an axis. More... | |
| file | ColumnSpawnPlacer.ixx |
|
Spawn placer that arranges entities in a vertical column. More... | |
| file | DistributedSpawnPlacer.ixx |
|
Spawn placer that distributes entities across predefined locations. More... | |
| file | EmitterSpawnPlacer.ixx |
|
Placer that spawns entities at the emitter's position. More... | |
| file | RandomSpawnPlacer.ixx |
|
Placer that spawns entities at random positions within bounds. More... | |
Description
helios::engine::runtime::spawn::behavior::placements
Concrete SpawnPlacer implementations.
Overview
This module provides ready-to-use SpawnPlacer implementations for determining spawn positions.
Key Classes
| Class | Purpose |
|---|---|
| RandomSpawnPlacer | Places entities at random positions within level bounds |
| EmitterSpawnPlacer | Places entities at the emitter's position |
Usage
// Enemies spawn at random locations
auto enemyProfile = SpawnProfile{
.gameObjectPoolId = enemyPoolId,
.spawnPlacer = std::make_unique<RandomSpawnPlacer>(),
.spawnInitializer = std::make_unique<RandomDirectionInitializer>()
};
// Projectiles spawn at the firing entity's position
auto bulletProfile = SpawnProfile{
.gameObjectPoolId = bulletPoolId,
.spawnPlacer = std::make_unique<EmitterSpawnPlacer>(),
.spawnInitializer = std::make_unique<EmitterInitializer>()
};
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.