Merge pull request #3991 from HoGarfield/AnimationManager

closed #3040: Modify the sequenceCompleted method in CCBAnimationManager,So it can set the next sequence in callback
This commit is contained in:
James Chen 2013-10-22 01:30:06 -07:00
commit 59b5c26abf
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