Add a listener for a given event.
The event name.
The listener function.
Optionalcontext: C
The context to invoke the listener with. Default this.
Removes all listeners.
Calls each of the listeners registered for a given event.
The event name.
Additional arguments that will be passed to the event handler.
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
The event name.
Return the listeners registered for a given event.
The event name.
Remove the listeners of a given event.
The event name.
Optionalfn: EventCallbackFn<D>
Only remove the listeners that match this function.
Optionalcontext: C
Only remove the listeners that have this context.
Optionalonce: boolean
Only remove one-time listeners.
Add a listener for a given event.
The event name.
The listener function.
Optionalcontext: C
The context to invoke the listener with. Default this.
Add a one-time listener for a given event.
The event name.
The listener function.
Optionalcontext: C
The context to invoke the listener with. Default this.
Remove all listeners, or those of the specified event.
Optionalevent: AnyEvent
The event name.
Remove the listeners of a given event.
The event name.
Optionalfn: EventCallbackFn<D>
Only remove the listeners that match this function.
Optionalcontext: C
Only remove the listeners that have this context.
Optionalonce: boolean
Only remove one-time listeners.
Removes all listeners.
Extension of
Phaser.Events.EventEmitterwith custom event names