Class: EventTimer

requiem~events.EventTimer

Class for handling timed events.

Constructor

new EventTimer()

Source:

Members

(static) eventPool

Source:
See:

(static) sharedInstance

Gets the singleton instance of EventTimer.
Source:

eventPool

The current event pool.
Source:

Methods

(static) addEvent()

Source:
See:

(static) addEventListener()

Source:
See:

(static) hasEventLisetener()

Source:
See:

(static) removeAllEvents()

Source:
See:

(static) removeEvent()

Source:
See:

(static) removeEventListener()

Source:
See:

addEvent(id, func, delayopt, countopt, overwriteopt, {string)

Adds an event to the EventTimer.
Parameters:
Name Type Attributes Default Description
id string Unique ID of the timed event.
func function Callback to be invoked when event triggers.
delay number <optional>
0 Delay (interval) of event (in ms).
count number <optional>
1 Number of times the event should invoke. If set to 0, it will be infinite.
overwrite boolean <optional>
true Specifies whether this timed event should overwrite an existing one with the same name.
{string [eventName] - The event name of the custom event to be dispatched.
...params * <optional>
Additional parameters that are passed through to the function specified by 'func'.
Source:

removeAllEvents()

Removes all timed events from the EventTimer.
Source:

removeEvent(id)

Removes a timed event by its ID.
Parameters:
Name Type Description
id string ID of the timed event.
Source: