mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
stop AnimationAnimator if all animations are removed
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user