The interval event interface

interface IntervalEvent {
    callback: ((dt: number) => void);
    delay: number;
    intervalLast: number;
    name: string;
    timeCreated: number;
    type: interval;
}

Hierarchy (view full)

Properties

callback: ((dt: number) => void)

The callback function to execute when the event triggers

Type declaration

    • (dt): void
    • Parameters

      • dt: number

        The time since the last execution of the event in milliseconds For timeout events, this will be the time since the event was created. For interval events, this will be the time since the last execution of the event (based on the frame rate).

      Returns void

delay: number

The delay before the event triggers

0
intervalLast: number

The last time the event was executed

name: string

The name / identifier of the event

timeCreated: number

The time the event was created, as a Unix timestamp/ Created automatically when the event is added to the event manager.

type: interval

The type of the event

"timeout"