public void AdvanceFrame()
{
m_curFrameIndex++;
if (m_curFrameIndex >= m_sprite.Frame[m_curSet, m_curAnimation, m_curOrientation].Length)
{
// We have reached the end, start the "next animation".
// Note: The frame index will automatically be reset
CurrentAnimation = m_sprite.Animation[m_curAnimation].NextAnimationName;
}