Package: pumpkin.events

EventDispatcher


Description

The EventDispatcher class is the base class for all DisplayObjects and anything that dispatches events.



Constructors

EventDispatcher

Create empty EventDispatcher instance.


Functions

EventCallback

addEventListener

Add listener function to response to the event type.

addEventListener

Add listener function to response to the event type with capture.

addGameObjectEventListener

Add GameObject message handler, dispatching event sends message to the method name listenerFun.

addGameObjectEventListener

Add GameObject message handler, dispatching event sends message to the method name listenerFun with capture.

dispatchEventReturnVoid

Same as dispatchEvent but void return type workarround for closures.

dispatchEvent

Dispatches an even bound using addEventListener.

removeAllEventListeners

Remove all event listeners.

removeEventListener

Remove event listener.

removeEventListener

Remove event listener with capture.

removeGameObjectEventListener

Remove event listener.

removeGameObjectEventListener

Remove event listener with capture.

willTrigger

Returns true if the event is being listened on.

hasEventListener

Returns true if the event is being listened on.

getEventListeners

Returns all event listeners.


Variables

MAX_RECURSE

Global max call depth all event dispatchers can recurse.