Added AnimationFinished command to Sprite for when the animation starts over.
This commit is contained in:
@@ -4,6 +4,11 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes
|
||||
from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
|
||||
________________________________________________________________________________
|
||||
|
||||
2015/07/15
|
||||
----------
|
||||
* [Sprite] Sprite now executes the AnimationFinished command when it reaches
|
||||
the end of its animation and starts over. [kyzentun]
|
||||
|
||||
2015/07/11
|
||||
----------
|
||||
* [ScreenMapControllers] If the AutoDismissWarningSecs metric is less than
|
||||
|
||||
@@ -375,6 +375,10 @@ void Sprite::UpdateAnimationState()
|
||||
// increment frame and reset the counter
|
||||
m_fSecsIntoState -= m_States[m_iCurState].fDelay; // leave the left over time for the next frame
|
||||
m_iCurState = (m_iCurState+1) % m_States.size();
|
||||
if(m_iCurState == 0)
|
||||
{
|
||||
PlayCommand("AnimationFinished");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user