Skip to main content

SpawnAmountProvider.ixx File

Abstract interface for determining spawn quantity. 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

classSpawnAmountProvider

Abstract interface for determining spawn quantity. More...

Description

Abstract interface for determining spawn quantity.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file SpawnAmountProvider.ixx
3 * @brief Abstract interface for determining spawn quantity.
4 */
5module;
6
7export module helios.engine.runtime.spawn.policy.amount.SpawnAmountProvider;
8
9import helios.engine.runtime.spawn.policy.SpawnRuleState;
10import helios.engine.runtime.pooling.types.GameObjectPoolId;
11import helios.engine.runtime.world.UpdateContext;
12import helios.engine.runtime.world.GameWorld;
13
15
16 /**
17 * @brief Abstract interface for determining spawn quantity.
18 *
19 * @details SpawnAmountProvider defines the strategy for calculating how
20 * many entities should spawn when a rule's condition is satisfied.
21 *
22 * Implementations include:
23 * - **FixedSpawnAmount:** Always returns a fixed count
24 * - **SpawnAmountByCallback:** Delegates to a user-provided function
25 *
26 * @see FixedSpawnAmount
27 * @see SpawnAmountByCallback
28 * @see SpawnRule
29 */
31
32 public:
33
34 virtual ~SpawnAmountProvider() = default;
35
36 /**
37 * @brief Returns the number of entities to spawn.
38 *
39 * @param gameObjectPoolId The pool to spawn from.
40 * @param spawnRuleState The rule's current runtime state.
41 * @param gameWorld The game world in which the spawn occurs.
42 * @param updateContext The current frame's context.
43 *
44 * @return Number of entities to spawn.
45 */
46 [[nodiscard]] virtual size_t getAmount(
48 const SpawnRuleState& spawnRuleState,
51 ) const = 0;
52
53 };
54
55
56}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.