Class: LifetimeComponent
Defined in: lifecycle/components/lifetime-component.ts:7
Component that tracks the elapsed time and duration of an entity's lifetime. This is a pure data component with no logic.
Implements
Constructors
Constructor
new LifetimeComponent(
durationSeconds):LifetimeComponent
Defined in: lifecycle/components/lifetime-component.ts:18
Creates an instance of the LifetimeComponent.
Parameters
durationSeconds
number
The total duration of the entity's lifetime in seconds.
Returns
LifetimeComponent
Properties
durationSeconds
durationSeconds:
number
Defined in: lifecycle/components/lifetime-component.ts:10
elapsedSeconds
elapsedSeconds:
number
Defined in: lifecycle/components/lifetime-component.ts:9
hasExpired
hasExpired:
boolean
Defined in: lifecycle/components/lifetime-component.ts:11
name
name:
symbol
Defined in: lifecycle/components/lifetime-component.ts:8
The unique name of the component.
Implementation of
symbol
readonlystaticsymbol: typeofsymbol
Defined in: lifecycle/components/lifetime-component.ts:12
Methods
reset()
reset(
durationSeconds):void
Defined in: lifecycle/components/lifetime-component.ts:25
Parameters
durationSeconds
number = ...
Returns
void