예제 #1
0
        /// <summary>
        /// Creates a keyframe at the specified frame for the control.
        /// </summary>
        /// <param name="control"></param>
        /// <param name="frame"></param>
        public void CreateKeyFrame(GUIControl control, UInt32 frame)
        {
            if (frame >= NumFrames)
            {
                return;
            }

            // If this is the first keyframe for this channel and it's not the first
            // frame, create a first frame automatically.
            if (frame != 0 && GetAnimationChannel(control) == null)
            {
                CreateKeyFrame(control, 0);
            }

            KeyFrame keyFrame = control.CreateKeyFrame();

            keyFrame.Frame = frame;

            CreateKeyFrame(control, keyFrame);
        }