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.
Extends
Constructors
Constructor
new LifetimeComponent(
durationSeconds):LifetimeComponent
Defined in: lifecycle/components/lifetime-component.ts:16
Creates an instance of the LifetimeComponent.
Parameters
durationSeconds
number
The total duration of the entity's lifetime in seconds.
Returns
LifetimeComponent
Overrides
Properties
durationSeconds
durationSeconds:
number
Defined in: lifecycle/components/lifetime-component.ts:9
elapsedSeconds
elapsedSeconds:
number
Defined in: lifecycle/components/lifetime-component.ts:8
hasExpired
hasExpired:
boolean
Defined in: lifecycle/components/lifetime-component.ts:10
Accessors
id
Get Signature
get
staticid():symbol
Defined in: ecs/types/Component.ts:12
The unique id of the component.
Returns
symbol
Inherited from
Methods
reset()
reset(
durationSeconds):void
Defined in: lifecycle/components/lifetime-component.ts:24
Parameters
durationSeconds
number = ...
Returns
void