Skip to main content

components Folder

Files Index

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

Aggregates lifecycle-related component modules. More...

fileengine/mechanics/lifecycle/components/Active.ixx

Tag component indicating an active entity. More...

fileDeadTagComponent.ixx

Tag component marking an entity as dead. More...

fileDelayedComponentEnabler.ixx

Component for scheduling delayed activation of other components. More...

fileengine/mechanics/lifecycle/components/Inactive.ixx

Tag component indicating an inactive entity. More...

Description

helios::engine::mechanics::lifecycle::components

Components for managing entity lifecycle states.

Overview

This module provides tag components for entity activation state, a marker for dead entities, and a component for scheduling delayed activation of other components after spawn.

Components

ComponentDescription
ActiveTag component added to active entities; used as a view filter
InactiveTag component added to inactive entities; used as a view filter
DeadTagComponentMarker component attached when health is depleted; move-only
DelayedComponentEnablerTracks components pending delayed activation with countdown timers

Active / Inactive

Managed automatically by GameObject::setActive():

  • setActive(true) → adds Active, removes Inactive, calls onActivate() on components
  • setActive(false) → adds Inactive, removes Active, calls onDeactivate() on components

Systems filter on these tags via views:

 // Only process active entities
 for (auto [entity, health, active] : gameWorld->view<
  HealthComponent, Active
 >().whereEnabled()) { ... }

DeadTagComponent

Attached by HealthManager when an entity's health reaches zero and the HealthDepletedBehavior::DeadTag flag is set. Systems can query for this tag to apply death-related logic (scoring, VFX, cleanup) without re-checking health values. Move-only; copying is not permitted.

DelayedComponentEnabler

Schedules delayed activation of other components. Works in conjunction with DelayedComponentEnablerSystem.

 auto* enabler = entity.get<DelayedComponentEnabler>();
 enabler->defer(entity, ComponentTypeId::id<CollisionComponent>(), 0.5f);


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.