mirror of
https://github.com/photonstorm/phaser
synced 2024-12-30 06:53:07 +00:00
1 line
8.9 KiB
JSON
1 line
8.9 KiB
JSON
|
{"class":{"name":"Phaser.Signal","extends":"","static":false,"constructor":true,"parameters":[],"help":"A Signal is used for object communication via a custom broadcaster instead of Events."},"consts":[],"methods":{"public":[{"name":"add","static":false,"returns":{"types":["Phaser.SignalBinding"],"help":"An Object representing the binding between the Signal and listener."},"help":"Add a listener to the signal.","line":184,"public":true,"protected":false,"private":false,"parameters":[{"name":"listener","type":["function"],"help":"The function to call when this Signal is dispatched.","optional":false,"default":null},{"name":"listenerContext","type":["object"],"help":"The context under which the listener will be executed (i.e. the object that should represent the `this` variable).","optional":true,"default":null},{"name":"priority","type":["number"],"help":"The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0)","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"addOnce","static":false,"returns":{"types":["Phaser.SignalBinding"],"help":"An Object representing the binding between the Signal and listener."},"help":"Add listener to the signal that should be removed after first execution (will be executed only once).","line":201,"public":true,"protected":false,"private":false,"parameters":[{"name":"listener","type":["function"],"help":"The function to call when this Signal is dispatched.","optional":false,"default":null},{"name":"listenerContext","type":["object"],"help":"The context under which the listener will be executed (i.e. the object that should represent the `this` variable).","optional":true,"default":null},{"name":"priority","type":["number"],"help":"The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0)","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"dispatch","static":false,"returns":null,"help":"Dispatch\/Broadcast Signal to all listeners added to the queue.","line":299,"public":true,"protected":false,"private":false,"parameters":[{"name":"params","type":["any"],"help":"Parameters that should be passed to each handler.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"dispose","static":false,"returns":null,"help":"Remove all bindings from signal and destroy any reference to external objects (destroy Signal object).\\nIMPORTANT: calling any method on the signal instance after calling dispose will throw errors.","line":351,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"forget","static":false,"returns":null,"help":"Forget memorized arguments.","line":339,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"getNumListeners","static":false,"returns":{"types":["number"],"help":"Number of listeners attached to the Signal."},"help":"Gets the total number of listeneres attached to ths Signal.","line":274,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"halt","static":false,"returns":null,"help":"Stop propagation of the event, blocking the dispatch to next listeners on the queue.\\nIMPORTANT: should be called only during signal dispatch, calling it before\/after dispatch won't affect signal broadcast.","line":287,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"has","static":false,"returns":{"types":["boolean"],"help":"If Signal has the specified listener."},"help":"Check if listener was attached to Signal.","line":169,"public":true,"protected":false,"private":false,"parameters":[{"name":"listener","type":["function"],"help":"Signal handler func
|