Universe.Region.SceneObjectGroup.AddKeyframedMotion C# (CSharp) Method

AddKeyframedMotion() public method

public AddKeyframedMotion ( KeyframeAnimation animation, KeyframeAnimation command ) : void
animation Universe.Framework.SceneInfo.Entities.KeyframeAnimation
command Universe.Framework.SceneInfo.Entities.KeyframeAnimation
return void
        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;
            }
        }
SceneObjectGroup