components Folder
Files Index
| file | helios/engine/mechanics/spawn/components/_module.ixx |
|
Aggregate module for helios::engine::mechanics::spawn::components namespace. More... | |
| file | EmittedByComponent.ixx |
|
Component tracking the source entity that emitted a spawned object. More... | |
| file | SpawnedByProfileComponent.ixx |
|
Component that tracks which spawn profile created a GameObject. More... | |
Description
helios::engine::mechanics::spawn::components
Components for spawn-related entity tracking.
Overview
This module provides components that track spawn-related metadata on GameObjects. These components enable the spawn/despawn pipeline to route entities to the correct pools and managers.
Key Classes
| Class | Purpose |
|---|---|
| SpawnedByProfileComponent | Tracks which spawn profile created an entity |
Usage
// Attach to prefab during pool configuration
auto prefab = std::make_unique<GameObject>();
prefab->add<SpawnedByProfileComponent>();
// Set profile ID during spawn
auto* comp = entity.get<SpawnedByProfileComponent>();
comp->setSpawnProfileId(enemyProfileId);
// Read profile ID during despawn
auto profileId = entity.get<SpawnedByProfileComponent>()->spawnProfileId();
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.