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.core.data.GameObjectPoolId;
11import helios.engine.runtime.world.UpdateContext;
12
14
15 /**
16 * @brief Abstract interface for determining spawn quantity.
17 *
18 * @details SpawnAmountProvider defines the strategy for calculating how
19 * many entities should spawn when a rule's condition is satisfied.
20 *
21 * Implementations include:
22 * - **FixedSpawnAmount:** Always returns a fixed count
23 * - **SpawnAmountByCallback:** Delegates to a user-provided function
24 *
25 * @see FixedSpawnAmount
26 * @see SpawnAmountByCallback
27 * @see SpawnRule
28 */
30
31 public:
32
33 virtual ~SpawnAmountProvider() = default;
34
35 /**
36 * @brief Returns the number of entities to spawn.
37 *
38 * @param gameObjectPoolId The pool to spawn from.
39 * @param spawnRuleState The rule's current runtime state.
40 * @param updateContext The current frame's context.
41 *
42 * @return Number of entities to spawn.
43 */
44 [[nodiscard]] virtual size_t getAmount(
46 const SpawnRuleState& spawnRuleState,
48 ) const = 0;
49
50 };
51
52
53}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.