events Folder
Files Index
| file | helios/engine/runtime/spawn/events/_module.ixx |
|
Aggregate module for helios::engine::runtime::spawn::events namespace. More... | |
| file | SpawnPlanCommandExecutedEvent.ixx |
|
Event indicating a spawn plan has been executed. More... | |
Description
helios::engine::runtime::spawn::events
Spawn-related events for cross-frame communication.
Overview
This module provides events that are pushed to the frame event bus to enable communication between the spawn system and the scheduling system.
Key Classes
| Class | Purpose |
|---|---|
| SpawnPlanCommandExecutedEvent | Signals that a spawn plan command was executed |
Usage
Events are pushed by the SpawnManager after processing spawn commands:
// In SpawnManager::flush()
updateContext.pushFrame<SpawnPlanCommandExecutedEvent>(
spawnRuleId, actualSpawnCount
);
Events are read by the GameObjectSpawnSystem in the next frame:
// In GameObjectSpawnSystem::update()
for (const auto& evt : updateContext.readFrame<SpawnPlanCommandExecutedEvent>()) {
spawnScheduler_->commit(evt.spawnRuleId, evt.spawnCount);
}
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.