Skip to main content

SpawnAmountProvider Class

Abstract interface for determining spawn quantity. More...

Declaration

class helios::engine::runtime::spawn::policy::amount::SpawnAmountProvider { ... }

Derived Classes

classFixedSpawnAmount

Amount provider that returns a fixed spawn count. More...

classSpawnAll

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

classSpawnAmountByCallback

Amount provider that delegates to a user-provided callback. More...

Public Destructor Index

~SpawnAmountProvider ()=default

Public Member Functions Index

size_tgetAmount (const helios::engine::core::data::GameObjectPoolId gameObjectPoolId, const SpawnRuleState &spawnRuleState, const helios::engine::runtime::world::UpdateContext &updateContext) const =0

Returns the number of entities to spawn. More...

Description

Abstract interface for determining spawn quantity.

SpawnAmountProvider defines the strategy for calculating how many entities should spawn when a rule's condition is satisfied.

Implementations include:

  • **FixedSpawnAmount:** Always returns a fixed count
  • **SpawnAmountByCallback:** Delegates to a user-provided function
See Also

FixedSpawnAmount

See Also

SpawnAmountByCallback

See Also

SpawnRule

Definition at line 29 of file SpawnAmountProvider.ixx.

Public Destructor

~SpawnAmountProvider()

virtual helios::engine::runtime::spawn::policy::amount::SpawnAmountProvider::~SpawnAmountProvider ()
virtual default

Definition at line 33 of file SpawnAmountProvider.ixx.

Public Member Functions

getAmount()

virtual size_t helios::engine::runtime::spawn::policy::amount::SpawnAmountProvider::getAmount (const helios::engine::core::data::GameObjectPoolId gameObjectPoolId, const SpawnRuleState & spawnRuleState, const helios::engine::runtime::world::UpdateContext & updateContext)
nodiscard

Returns the number of entities to spawn.

Parameters
gameObjectPoolId

The pool to spawn from.

spawnRuleState

The rule's current runtime state.

updateContext

The current frame's context.

Returns

Number of entities to spawn.

Definition at line 44 of file SpawnAmountProvider.ixx.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.