policy Folder
Folders Index
| folder | amount |
| folder | conditions |
Files Index
| file | helios/engine/runtime/spawn/policy/_module.ixx |
|
Aggregate module for helios::engine::runtime::spawn::policy namespace. More... | |
| file | SpawnCondition.ixx |
|
Abstract interface for determining spawn timing. More... | |
| file | SpawnConditionAll.ixx |
|
Composite condition that requires all child conditions to be satisfied. More... | |
| file | SpawnRule.ixx |
|
Combines a condition and amount provider into a complete spawn rule. More... | |
| file | SpawnRuleState.ixx |
|
Runtime state for a spawn rule. More... | |
Description
helios::engine::runtime::spawn::policy
Spawn rules, conditions, and amount providers.
Overview
This module provides the policy layer for the spawn system. It defines rules that combine conditions (when to spawn) with amount providers (how many to spawn).
Key Classes
| Class | Purpose |
|---|---|
| SpawnRule | Combines condition and amount provider into evaluatable rule |
| SpawnCondition | Abstract interface for spawn timing conditions |
| SpawnRuleState | Runtime state tracked per rule (e.g., time since last spawn) |
Submodules
| Directory | Purpose |
|---|---|
| amount/ | SpawnAmountProvider implementations |
| conditions/ | SpawnCondition implementations |
Usage
// Create a rule: spawn 3 enemies every 2 seconds
auto rule = std::make_unique<SpawnRule>(
std::make_unique<TimerSpawnCondition>(2.0f),
std::make_unique<FixedSpawnAmount>(3),
SpawnRuleId{1}
);
// Add to scheduler
scheduler.addRule(enemyProfileId, std::move(rule));
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.