diff --git a/cocos/3d/CCAnimate3D.cpp b/cocos/3d/CCAnimate3D.cpp index ffa9cce8d3..046a13839d 100644 --- a/cocos/3d/CCAnimate3D.cpp +++ b/cocos/3d/CCAnimate3D.cpp @@ -433,12 +433,9 @@ void Animate3D::removeFromMap() if (_target) { Sprite3D* sprite = static_cast(_target); - if (_state == Animate3D::Animate3DState::FadeIn) - s_fadeInAnimates.erase(sprite); - else if (_state == Animate3D::Animate3DState::FadeOut) - s_fadeOutAnimates.erase(sprite); - else - s_runningAnimates.erase(sprite); + s_fadeInAnimates.erase(sprite); + s_fadeOutAnimates.erase(sprite); + s_runningAnimates.erase(sprite); } }