SpawnPoolConfig Class
ID-centric configuration for a spawn pool with associated profiles. More...
Declaration
Public Constructors Index
| SpawnPoolConfig (helios::engine::runtime::pooling::GameObjectPoolManager &poolManager, helios::engine::runtime::spawn::SpawnManager &spawnManager, helios::engine::runtime::pooling::types::GameObjectPoolId poolId, helios::engine::common::types::PrefabId prefabId, size_t poolSize) | |
|
Constructs a SpawnPoolConfig. More... | |
Public Member Functions Index
| SpawnProfileConfig & | profile (helios::engine::runtime::spawn::types::SpawnProfileId profileId) |
|
Begins configuration of a spawn profile for this pool. More... | |
| SpawnSystemConfigurator | commit () |
|
Commits pool, all profiles, and registers scheduled rules. More... | |
| SpawnSystemConfigurator | commitProfilesOnly () |
|
Commits pool and profiles without creating any schedulers. More... | |
template <std::size_t N> | |
| SpawnSystemConfigurator | commitCyclic () |
|
Commits with all scheduled rules in a single CyclicSpawnScheduler. More... | |
Private Member Functions Index
| void | commitPool () |
|
Registers the pool with the pool manager. More... | |
| void | commitProfiles (bool skipSchedulers) |
|
Commits all profiles and optionally creates per-profile schedulers. More... | |
Private Member Attributes Index
| helios::engine::runtime::pooling::GameObjectPoolManager & | poolManager_ |
|
The pool manager to register with. More... | |
| helios::engine::runtime::spawn::SpawnManager & | spawnManager_ |
|
The spawn manager to register profiles with. More... | |
| helios::engine::runtime::pooling::types::GameObjectPoolId | poolId_ |
|
Pool identifier. More... | |
| helios::engine::common::types::PrefabId | prefabId_ |
|
Identifier of the prefab template for cloning. More... | |
| size_t | size_ |
|
Number of instances to pre-allocate. More... | |
| std::vector< std::unique_ptr< SpawnProfileConfig > > | profiles_ |
|
Profile configurations attached to this pool. More... | |
Description
ID-centric configuration for a spawn pool with associated profiles.
Bundles a pool ID with its PrefabId, pool size, and one or more spawn profiles. Each profile can optionally have scheduled rules. Calling commit() registers the pool, all profiles, and any scheduled rules with a DefaultSpawnScheduler.
- See Also
- See Also
- See Also
Definition at line 442 of file SpawnPoolConfig.ixx.
Public Constructors
SpawnPoolConfig()
| inline |
Constructs a SpawnPoolConfig.
- Parameters
-
poolManager The pool manager to register pools with.
spawnManager The spawn manager to register profiles with.
poolId Unique identifier for the pool.
prefabId Identifier of the prefab template for cloning.
poolSize Number of instances to pre-allocate.
Definition at line 487 of file SpawnPoolConfig.ixx.
Public Member Functions
commit()
| inline |
Commits pool, all profiles, and registers scheduled rules.
Profiles with scheduled rules are automatically registered with a DefaultSpawnScheduler per profile.
- Returns
Configurator for chaining the next pool() call.
Definition at line 519 of file SpawnPoolConfig.ixx.
commitCyclic()
| inline |
Commits with all scheduled rules in a single CyclicSpawnScheduler.
Use this when multiple profiles share a cyclic spawn pattern (e.g., wave-based edge spawning). All rules across all profiles are bundled into one CyclicSpawnScheduler.
- Template Parameters
-
N Number of rules in the cyclic scheduler.
- Returns
Configurator for chaining the next pool() call.
Definition at line 570 of file SpawnPoolConfig.ixx.
commitProfilesOnly()
| inline |
Commits pool and profiles without creating any schedulers.
Use this when profiles should be registered but scheduling is handled separately (e.g., via SchedulerBuilder). Rules attached via scheduledBy() are silently discarded.
This enables reuse of the same profile configuration under different scheduling strategies:
```cpp // Register pool + profiles (no schedulers) spawns.pool(PoolId, PrefabId, 100) .profile(LeftId).axisPlacement(...).moveInitializer(...).done() .profile(RightId).axisPlacement(...).moveInitializer(...).done() .commitProfilesOnly();
// Attach scheduling separately SchedulerBuilder sb(spawnManager); sb.cyclicScheduler( SchedulerConfig(LeftId, Rule1).timerCondition(5.0f).fixedAmount(10), SchedulerConfig(RightId, Rule2).timerCondition(5.0f).fixedAmount(10) ); ```
- Returns
Configurator for chaining the next pool() call.
Definition at line 552 of file SpawnPoolConfig.ixx.
profile()
| inline |
Begins configuration of a spawn profile for this pool.
- Parameters
-
profileId Unique identifier for the profile.
- Returns
Reference to the new profile config for chaining.
Definition at line 504 of file SpawnPoolConfig.ixx.
Private Member Functions
commitPool()
| inline |
Registers the pool with the pool manager.
Definition at line 592 of file SpawnPoolConfig.ixx.
commitProfiles()
| inline |
Commits all profiles and optionally creates per-profile schedulers.
- Parameters
-
skipSchedulers If true, profiles are committed without scheduler creation.
Definition at line 606 of file SpawnPoolConfig.ixx.
Private Member Attributes
poolId_
|
Pool identifier.
Definition at line 457 of file SpawnPoolConfig.ixx.
poolManager_
|
The pool manager to register with.
Definition at line 447 of file SpawnPoolConfig.ixx.
prefabId_
|
Identifier of the prefab template for cloning.
Definition at line 462 of file SpawnPoolConfig.ixx.
profiles_
|
Profile configurations attached to this pool.
Definition at line 472 of file SpawnPoolConfig.ixx.
size_
|
Number of instances to pre-allocate.
Definition at line 467 of file SpawnPoolConfig.ixx.
spawnManager_
|
The spawn manager to register profiles with.
Definition at line 452 of file SpawnPoolConfig.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.