Added AnimationFinished command to Sprite for when the animation starts over.

This commit is contained in:
Kyzentun Keeslala
2015-07-15 01:35:30 -06:00
parent d7411e6cdb
commit e81ebfb5c5
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -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
+4
View File
@@ -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");
}
}
}
}