Data passed to a slot's onComplete callback when its timer completes.
onComplete
timers: { launch: createTimer(1.5, { onComplete: ({ entityId, slot, elapsed }) => { console.log(`Slot ${slot} on entity ${entityId} finished after ${elapsed}s`); }, }),} Copy
timers: { launch: createTimer(1.5, { onComplete: ({ entityId, slot, elapsed }) => { console.log(`Slot ${slot} on entity ${entityId} finished after ${elapsed}s`); }, }),}
The slot's configured duration in seconds
The actual elapsed time (may exceed duration slightly)
The entity ID that owns the timer slot
The slot name within the entity's timers map
timers
Data passed to a slot's
onCompletecallback when its timer completes.Example