LifetimeComponent class

Lifetime component - Entity that expires after time

Inheritance

Constructors

LifetimeComponent(double initialLifetime)
Create a lifetime component

Properties

componentType → Type
Type identifier for this component
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
initialLifetime ↔ double
Initial lifetime
getter/setter pair
isExpired → bool
Check if expired
no setter
progress → double
Get progress (0 to 1)
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeRemaining ↔ double
Time remaining (seconds)
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAttach(EntityId entityId) → void
Called when this component is added to an entity.
inherited
onDetach(EntityId entityId) → void
Called when this component is removed from an entity.
inherited
toString() → String
A string representation of this object.
override
update(double deltaTime) → void
Update lifetime

Operators

operator ==(Object other) → bool
The equality operator.
inherited