mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 11:03:23 +00:00
1 line
No EOL
8.9 KiB
JSON
1 line
No EOL
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 function.","optional":false,"default":null},{"name":"context","type":["object"],"help":"Context on which listener will be executed (object that should represent the `this` variable inside listener function).","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"remove","static":false,"returns":{"types":["function"],"help":"Listener handler function."},"help":"Remove a single listener from the dispatch queue.","line":217,"public":true,"protected":false,"private":false,"parameters":[{"name":"listener","type":["function"],"help":"Handler function that should be removed.","optional":false,"default":null},{"name":"context","type":["object"],"help":"Execution context (since you can add the same handler multiple times if executing in a different context).","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"removeAll","static":false,"returns":null,"help":"Remove all listeners from the Signal.","line":239,"public":true,"protected":false,"private":false,"parameters":[{"name":"context","type":["object"],"help":"If specified only listeners for the given context will be removed.","optional":true,"default":"null"}],"inherited":false,"inheritedFrom":""},{"name":"toString","static":false,"returns":{"types":["string"],"help":"String representation of the object."},"help":"","line":365,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[{"name":"_addBinding","static":false,"returns":null,"help":"","line":122,"public":false,"protected":false,"private":true,"parameters":[{"name":"binding","type":["Phaser.SignalBinding"],"help":"An Object representing the binding between the Signal and listener.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"_indexOfListener","static":false,"returns":{"types":["number"],"help":"The index of the listener within the private bindings array."},"help":"","line":142,"public":false,"protected":false,"private":true,"parameters":[{"name":"listener","type":["function"],"help":"Signal handler function.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"_registerListener","static":false,"returns":{"types":["Phaser.SignalBinding"],"help":"An Object representing the binding between the Signal and listener."},"help":"","line":88,"public":false,"protected":false,"private":true,"parameters":[{"name":"listener","type":["function"],"help":"Signal handler function.","optional":false,"default":null},{"name":"isOnce","type":["boolean"],"help":"Should the listener only be called once?","optional":false,"default":null},{"name":"listenerContext","type":["object"],"help":"The context under which the listener is invoked.","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":"validateListener","static":false,"returns":null,"help":"","line":70,"public":false,"protected":false,"private":true,"parameters":[{"name":"listener","type":["function"],"help":"Signal handler function.","optional":false,"default":null},{"name":"fnName","type":["string"],"help":"Function name.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"static":[]},"properties":{"public":[{"name":"active","type":["boolean"],"help":"If Signal is active and should broadcast events.\\nIMPORTANT: Setting this property during a dispatch will only affect the next dispatch, if you want to stop the propagation of a signal use `halt()` instead.","inlineHelp":"","line":62,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"dispatch","type":["function"],"help":"","inlineHelp":"The dispatch function is what sends the Signal out.","line":34,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"memorize","type":["boolean"],"help":"If Signal should keep record of previously dispatched parameters and\\nautomatically execute listener during `add()`\/`addOnce()` if Signal was\\nalready dispatched before.","inlineHelp":"","line":48,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"_bindings","type":["array Phaser.SignalBinding"],"help":"","inlineHelp":"Internal variable.","line":20,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_prevParams","type":["any"],"help":"","inlineHelp":"Internal variable.","line":26,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_shouldPropagate","type":["boolean"],"help":"","inlineHelp":"","line":54,"default":null,"public":false,"protected":false,"private":true,"readOnly":false}]}} |