Skip to main content

components Folder

Files Index

filehelios/engine/mechanics/spawn/components/_module.ixx

Aggregate module for helios::engine::mechanics::spawn::components namespace. More...

fileEmittedByComponent.ixx

Component tracking the source entity that emitted a spawned object. More...

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

ClassPurpose
SpawnedByProfileComponentTracks 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.