Skip to main content

SpawnAll.ixx File

Spawn amount provider that spawns all available pool objects. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespaceruntime

Runtime infrastructure for game execution and lifecycle orchestration. More...

namespacespawn

Entity spawning infrastructure for the helios engine. More...

namespacepolicy

Spawn rules, conditions, and amount providers. More...

namespaceamount

Spawn amount providers for determining spawn quantities. More...

Classes Index

classSpawnAll

Spawns all inactive objects from a pool. More...

Description

Spawn amount provider that spawns all available pool objects.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file SpawnAll.ixx
3 * @brief Spawn amount provider that spawns all available pool objects.
4 */
5module;
6
7export module helios.engine.runtime.spawn.policy.amount.SpawnAll;
8
9import helios.engine.runtime.pooling.types.GameObjectPoolId;
10
11import helios.engine.runtime.spawn.policy.amount.SpawnAmountProvider;
12import helios.engine.runtime.spawn.policy.SpawnRuleState;
13
14import helios.engine.runtime.world.UpdateContext;
15import helios.engine.runtime.world.GameWorld;
16
17import helios.engine.runtime.pooling.GameObjectPoolManager;
18
20
21 /**
22 * @brief Spawns all inactive objects from a pool.
23 *
24 * This provider queries the GameObjectPoolManager to determine
25 * how many inactive objects are available in the specified pool
26 * and returns that count as the spawn amount.
27 *
28 * Useful for scenarios where all pooled objects should be
29 * spawned at once, such as initial wave spawning or respawning
30 * all enemies after a level reset.
31 */
33
34 public:
35
36 /**
37 * @copydoc SpawnAmountProvider::getAmount
38 */
39 [[nodiscard]] size_t getAmount(
41 const SpawnRuleState& spawnRuleState,
44 ) const override {
46 if (!manager) {
47 return 0;
48 }
49 return manager->poolSnapshot(gameObjectPoolId).inactiveCount;
50 }
51
52 };
53
54
55}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.