SpawnProfile Struct
Configuration profile defining spawn behavior for a pool. More...
Declaration
Public Member Attributes Index
| const helios::engine::runtime::pooling::types::GameObjectPoolId | gameObjectPoolId |
|
The pool from which entities are acquired. More... | |
| std::unique_ptr< helios::engine::runtime::spawn::behavior::SpawnPlacer > | spawnPlacer |
|
Strategy for determining spawn positions. More... | |
| std::unique_ptr< helios::engine::runtime::spawn::behavior::SpawnInitializer > | spawnInitializer |
|
Strategy for initializing spawned entity state. More... | |
Description
Configuration profile defining spawn behavior for a pool.
SpawnProfile bundles a pool ID with the behaviors that control how spawned entities are positioned and initialized. Each profile is registered with a SpawnProfileId in the SpawnManager.
A profile consists of:
- **Pool ID:** Which pool to acquire entities from
- **Placer:** Determines spawn position (random, formation, emitter-relative)
- **Initializer:** Configures entity state (velocity, direction, stats)
Example: ```cpp auto profile = std::make_unique<SpawnProfile>(SpawnProfile{ .gameObjectPoolId = bulletPoolId, .spawnPlacer = std::make_unique<EmitterRelativePlacer>(), .spawnInitializer = std::make_unique<ProjectileInitializer>(speed) }); spawnManager.addSpawnProfile(profileId, std::move(profile)); ```
- See Also
SpawnPlacer
- See Also
SpawnInitializer
- See Also
Definition at line 43 of file SpawnProfile.ixx.
Public Member Attributes
gameObjectPoolId
|
The pool from which entities are acquired.
Definition at line 48 of file SpawnProfile.ixx.
spawnInitializer
|
Strategy for initializing spawned entity state.
Definition at line 58 of file SpawnProfile.ixx.
spawnPlacer
|
Strategy for determining spawn positions.
Definition at line 53 of file SpawnProfile.ixx.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.