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
+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");
}
}
}
}