Signal#dispatch()

dispatch(params) Dispatch / broadcast the event to all listeners. To create an instance-bound dispatch for this Signal, use boundDispatch. Parameters Name Type Argument Description params any <optional> Parameters that should be passed to each handler. Source code: core/Signal.js (Line 395)

Signal#dispose()

dispose() Dispose the signal - no more events can be dispatched. This removes all event listeners and clears references to external objects.Calling methods on a disposed objects results in undefined behavior. Source code: core/Signal.js (Line 451)

Signal#forget()

forget() Forget the currently memorized event, if any. Source code: core/Signal.js (Line 437)

Signal#getNumListeners()

getNumListeners() → {integer} Gets the total number of listeners attached to this Signal. Returns integer - Number of listeners attached to the Signal. Source code: core/Signal.js (Line 369)

Signal#halt()

halt() Stop propagation of the event, blocking the dispatch to next listener on the queue. This should be called only during event dispatch as calling it before/after dispatch won't affect another broadcast.See active to enable/disable the signal entirely. Source code: core/Signal.js (Line 381)

Signal#has()

has(listener, context) → {boolean} Check if a specific listener is attached. Parameters Name Type Argument Description listener function Signal handler function. context object <optional> Context on which listener will be executed (object that should represent the this variable inside listener function). Returns boolean - If Signal has the specified listener. Source code: core/Signal.js (Line 218)

Signal#memorize

memorize : boolean Memorize the previously dispatched event? If an event has been memorized it is automatically dispatched when a new listener is added with add or addOnce.Use forget to clear any currently memorized event. Source code: core/Signal.js (Line 84)

Signal#remove()

remove(listener, context) → {function} Remove a single event listener. Parameters Name Type Argument Default Description listener function Handler function that should be removed. context object <optional> null Execution context (since you can add the same handler multiple times if executing in a different context). Returns function - Listener handler function. Source code: core/Signal.js (Line 305)

Signal#removeAll()

removeAll(context) Remove all event listeners. Parameters Name Type Argument Default Description context object <optional> null If specified only listeners for the given context will be removed. Source code: core/Signal.js (Line 329)

Signal#Signal

new Signal() Signals are what Phaser uses to handle events and event dispatching.You can listen for a Signal by binding a callback / function to it.This is done by using either Signal.add or Signal.addOnce. For example you can listen for a touch or click event from the Input Managerby using its onDown Signal: game.input.onDown.add(function() { ... }); Rather than inline your function, you can pass a reference: game.input.onDown.add(clicked, this);function clicked () { ... } In this case the s