You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Signal.removeAll now has a new context parameter. If specified only listeners matching the given context are removed (thanks @lucbloom for the idea, phaserjs#880)
* Group.removeAll has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
124
124
* Internal child movements in Group (such as bringToTop) now uses the new `silent` parameter to avoid the child emitting incorrect Group addition and deletion events.
125
125
* Camera.updateTarget has had a make-over and now is a lot smoother under certain conditions (thanks @tjkopena, fix #966)
126
+
* Signal.removeAll now has a new `context` parameter. If specified only listeners matching the given context are removed (thanks @lucbloom for the idea, #880)
* @param {boolean} isOnce - Should the listener only be called once?
83
+
* @param {object} [listenerContext] - The context under which the listener is invoked.
83
84
* @param {number} [priority] - 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).
84
85
* @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener.
* @param {Phaser.SignalBinding} binding - An Object representing the binding between the Signal and listener.
119
118
* @private
119
+
* @param {Phaser.SignalBinding} binding - An Object representing the binding between the Signal and listener.
120
120
*/
121
121
_addBinding: function(binding){
122
122
@@ -134,9 +134,9 @@ Phaser.Signal.prototype = {
134
134
135
135
/**
136
136
* @method Phaser.Signal#_indexOfListener
137
-
* @param {function} listener - Signal handler function.
138
-
* @return {number} Description.
139
137
* @private
138
+
* @param {function} listener - Signal handler function.
139
+
* @return {number} The index of the listener within the private bindings array.
140
140
*/
141
141
_indexOfListener: function(listener,context){
142
142
@@ -161,8 +161,8 @@ Phaser.Signal.prototype = {
161
161
* Check if listener was attached to Signal.
162
162
*
163
163
* @method Phaser.Signal#has
164
-
* @param {Function} listener - Signal handler function.
165
-
* @param {Object} [context] - Context on which listener will be executed (object that should represent the `this` variable inside listener function).
164
+
* @param {function} listener - Signal handler function.
165
+
* @param {object} [context] - Context on which listener will be executed (object that should represent the `this` variable inside listener function).
166
166
* @return {boolean} If Signal has the specified listener.
167
167
*/
168
168
has: function(listener,context){
@@ -175,9 +175,9 @@ Phaser.Signal.prototype = {
175
175
* Add a listener to the signal.
176
176
*
177
177
* @method Phaser.Signal#add
178
-
* @param {function} listener - Signal handler function.
179
-
* @param {object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function).
180
-
* @param {number} [priority] 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).
178
+
* @param {function} listener - The function to call when this Signal is dispatched.
179
+
* @param {object} [listenerContext] - The context under which the listener will be executed (i.e. the object that should represent the `this` variable).
180
+
* @param {number} [priority] - 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)
181
181
* @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener.
182
182
*/
183
183
add: function(listener,listenerContext,priority){
@@ -192,9 +192,9 @@ Phaser.Signal.prototype = {
192
192
* Add listener to the signal that should be removed after first execution (will be executed only once).
193
193
*
194
194
* @method Phaser.Signal#addOnce
195
-
* @param {function} listener Signal handler function.
196
-
* @param {object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function).
197
-
* @param {number} [priority] 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)
195
+
* @param {function} listener - The function to call when this Signal is dispatched.
196
+
* @param {object} [listenerContext] - The context under which the listener will be executed (i.e. the object that should represent the `this` variable).
197
+
* @param {number} [priority] - 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)
198
198
* @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener.
0 commit comments