Skip to main content

policy Folder

Folders Index

folderamount
folderconditions

Files Index

filehelios/engine/runtime/spawn/policy/_module.ixx

Aggregate module for helios::engine::runtime::spawn::policy namespace. More...

fileSpawnCondition.ixx

Abstract interface for determining spawn timing. More...

fileSpawnConditionAll.ixx

Composite condition that requires all child conditions to be satisfied. More...

fileSpawnRule.ixx

Combines a condition and amount provider into a complete spawn rule. More...

fileSpawnRuleState.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

ClassPurpose
SpawnRuleCombines condition and amount provider into evaluatable rule
SpawnConditionAbstract interface for spawn timing conditions
SpawnRuleStateRuntime state tracked per rule (e.g., time since last spawn)

Submodules

DirectoryPurpose
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.