public void AddKeyframedMotion(KeyframeAnimation animation, KeyframeAnimation.Commands command)
{
if (command == KeyframeAnimation.Commands.Play)
{
m_rootPart.KeyframeAnimation = animation;
//Only have one at a time
m_scene.EventManager.OnFrame -= moveKeyframeMotion;
m_scene.EventManager.OnFrame += moveKeyframeMotion;
}
else
{
m_scene.EventManager.OnFrame -= moveKeyframeMotion;
if (command == KeyframeAnimation.Commands.Stop)
m_rootPart.KeyframeAnimation = null;
}
}