ecspresso
    Preparing search index...

    Interface TimerEventData<Slots>

    Data passed to a slot's onComplete callback when its timer completes.

    timers: {
    launch: createTimer(1.5, {
    onComplete: ({ entityId, slot, elapsed }) => {
    console.log(`Slot ${slot} on entity ${entityId} finished after ${elapsed}s`);
    },
    }),
    }
    interface TimerEventData<Slots extends string = string> {
        duration: number;
        elapsed: number;
        entityId: number;
        slot: Slots;
    }

    Type Parameters

    • Slots extends string = string
    Index

    Properties

    duration: number

    The slot's configured duration in seconds

    elapsed: number

    The actual elapsed time (may exceed duration slightly)

    entityId: number

    The entity ID that owns the timer slot

    slot: Slots

    The slot name within the entity's timers map