Skip to main content

Function: addTimerComponent()

addTimerComponent(world, entity, options?): TimerEcsComponent

Defined in: timer/components/timer-component.ts:60

Attaches a TimerEcsComponent to entity.

Parameters

world

EcsWorld

The ECS world entity belongs to.

entity

number

The entity to attach the component to.

options?

Partial<TimerEcsComponent> = {}

Options for configuring the timer.

Returns

TimerEcsComponent

The attached component, for further tuning or runtime changes.