We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7cd3de commit 50b1a67Copy full SHA for 50b1a67
1 file changed
v3/src/gameobjects/group/Group.js
@@ -344,13 +344,15 @@ var Group = new Class({
344
}
345
},
346
347
- getTotalUsed: function ()
+ countActive: function (value)
348
{
349
+ if (value === undefined) { value = true; }
350
+
351
var total = 0;
352
353
for (var i = 0; i < this.children.size; i++)
354
- if (this.children.entries[i].active)
355
+ if (this.children.entries[i].active === value)
356
357
total++;
358
@@ -359,6 +361,11 @@ var Group = new Class({
359
361
return total;
360
362
363
364
+ getTotalUsed: function ()
365
+ {
366
+ return this.countActive();
367
+ },
368
369
getTotalFree: function ()
370
371
var used = this.getTotalUsed();
0 commit comments