stop AnimationAnimator if all animations are removed

This commit is contained in:
2youyouo2
2017-09-21 15:28:13 +08:00
parent d5cd11a8b1
commit a73dc7a0ff
+4
View File
@@ -79,6 +79,10 @@ p.removeAnimation = function (anim) {
if (index >= 0) {
this._anims.fastRemoveAt(index);
cc.director.getAnimationManager().removeAnimation(anim);
if (this._anims.array.length === 0) {
this.stop();
}
}
else {
cc.errorID(3908);