Modify the sequenceCompleted method in CCBAnimationManager,So it can set the next sequence in callback

This commit is contained in:
garfield_ho 2013-10-22 15:56:35 +08:00
parent 7ef5bd8110
commit 0002815acb
1 changed files with 5 additions and 5 deletions

View File

@ -910,6 +910,11 @@ void CCBAnimationManager::sequenceCompleted()
_lastCompletedSequenceName = runningSequenceName;
}
if (nextSeqId != -1)
{
runAnimationsForSequenceIdTweenDuration(nextSeqId, 0);
}
if (_delegate)
{
// There may be another runAnimation() call in this delegate method
@ -920,11 +925,6 @@ void CCBAnimationManager::sequenceCompleted()
if (_target && _animationCompleteCallbackFunc) {
(_target->*_animationCompleteCallbackFunc)();
}
if (nextSeqId != -1)
{
runAnimationsForSequenceIdTweenDuration(nextSeqId, 0);
}
}
// Custom actions