mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +00:00
Added getTotal test
This commit is contained in:
parent
c72ea9b7f8
commit
a13b79f86e
1 changed files with 17 additions and 1 deletions
|
@ -383,7 +383,7 @@ var TweenManager = new Class({
|
||||||
{
|
{
|
||||||
list.splice(idx, 1);
|
list.splice(idx, 1);
|
||||||
|
|
||||||
tween.state = TWEEN_CONST.REMOVED;
|
tween.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,6 +502,22 @@ var TweenManager = new Class({
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getTotal: function ()
|
||||||
|
{
|
||||||
|
var tweens = this.tweens;
|
||||||
|
var active = 0;
|
||||||
|
|
||||||
|
for (var i = 0; i < tweens.length; i++)
|
||||||
|
{
|
||||||
|
if (tweens[i].state === TWEEN_CONST.ACTIVE)
|
||||||
|
{
|
||||||
|
active++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { active: active, total: tweens.length };
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array containing references to of all Tweens and Timelines in this Tween Manager.
|
* Returns an array containing references to of all Tweens and Timelines in this Tween Manager.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue