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
@@ -1205,6 +1205,36 @@ Phaser.Group.prototype.postUpdate = function () {
1205
1205
1206
1206
};
1207
1207
1208
+
1209
+
/**
1210
+
* Allows you to obtain a Phaser.ArrayList of children that return true for the given predicate
1211
+
* For example:
1212
+
* var healthyList = Group.filter(function(child, index, children) {
1213
+
* return child.health > 10 ? true : false;
1214
+
* }, true);
1215
+
* healthyList.callAll('attack');
1216
+
* Note: Currently this will skip any children which are Groups themselves.
1217
+
* @method Phaser.Group#filter
1218
+
* @param {function} predicate - The function that each child will be evaluated against. Each child of the Group will be passed to it as its first parameter, the index as the second, and the entire child array as the third
1219
+
* @param {boolean} [checkExists=false] - If set only children with exists=true will be passed to the callback, otherwise all children will be passed.
1220
+
* @return {Phaser.ArrayList} Returns an array list containing all the children that the predicate returned true for
0 commit comments