RuleProcessor Class
Abstract interface for processing spawn rules into spawn plans. More...
Declaration
Derived Classes
| class | DefaultRuleProcessor |
|
Default implementation of RuleProcessor. More... | |
Public Destructor Index
| ~RuleProcessor ()=default | |
|
Virtual destructor for proper cleanup. More... | |
Public Member Functions Index
| SpawnPlan | processRule (const helios::engine::runtime::world::UpdateContext &updateContext, const helios::engine::runtime::spawn::SpawnContext &spawnContext, const helios::engine::core::data::SpawnProfileId spawnProfileId, helios::engine::runtime::spawn::policy::SpawnRule &spawnRule, helios::engine::runtime::spawn::policy::SpawnRuleState &spawnRuleState) noexcept=0 |
|
Processes a spawn rule and produces a spawn plan. More... | |
Description
Abstract interface for processing spawn rules into spawn plans.
RuleProcessor defines the contract for evaluating a single spawn rule and producing a SpawnPlan. This abstraction allows different processing strategies to be plugged into schedulers.
## Responsibilities
- Retrieve pool and profile information from the game world
- Update the rule's state (timers, counts)
- Evaluate the rule's conditions
- Produce a SpawnPlan if conditions are met
- See Also
- See Also
- See Also
SpawnRule
Definition at line 38 of file RuleProcessor.ixx.
Public Destructor
~RuleProcessor()
| virtual default |
Virtual destructor for proper cleanup.
Definition at line 45 of file RuleProcessor.ixx.
Public Member Functions
processRule()
| noexcept |
Processes a spawn rule and produces a spawn plan.
Evaluates the given rule against current game state and produces a SpawnPlan indicating how many entities should be spawned. A plan with `amount == 0` indicates the rule's conditions were not met.
- Parameters
-
updateContext Current frame context with delta time and world access.
spawnContext Context information for the spawn operation.
spawnProfileId The profile ID associated with this rule.
spawnRule The rule to evaluate.
spawnRuleState Mutable state for the rule (timers, counts).
- Returns
SpawnPlan with amount > 0 if spawn should occur, otherwise amount == 0.
Definition at line 62 of file RuleProcessor.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.