A list of timed keyframes which can be used to play an animation.
Inheritance: INameable
        public TimedKeyframeList ToTimedKeyframeList(List<InstructionSet> instructionSetList)
        {
            InstructionSet targetInstructionSet = null;

            foreach (InstructionSet instructionSet in instructionSetList)
            {
                if (instructionSet.Name == this.Target)
                {
                    targetInstructionSet = instructionSet;
                    break;
                }
            }

            // Now that we know which InstructionSet we're working with, find the keyframe with the
            // matching name
            KeyframeList targetKeyframeList = null;
            foreach (KeyframeList keyframeList in targetInstructionSet)
            {
                if (keyframeList.Name == this.NameOfReferencedKeyframeList)
                {
                    targetKeyframeList = keyframeList;
                    break;
                }
            }

            TimedKeyframeList timedKeyframeList = new TimedKeyframeList(targetKeyframeList, Target);

            timedKeyframeList.TimeToExecute = Time;

            return timedKeyframeList;
        }
        public static TimedKeyframeListSave FromTimedKeyframeList(TimedKeyframeList timedKeyframeList)
        {
            TimedKeyframeListSave tkls = new TimedKeyframeListSave();
            tkls.Name = timedKeyframeList.Name;
            tkls.Target = timedKeyframeList.TargetName;
            tkls.NameOfReferencedKeyframeList = timedKeyframeList.NameOfReferencedKeyframeList;
            tkls.Time = timedKeyframeList.TimeToExecute;

            return tkls;
        }
 private static int CompareEndTime(TimedKeyframeList first, TimedKeyframeList second)
 {
     return(System.Math.Sign((first.TimeToExecute + first.Length) -
                             (second.TimeToExecute + second.Length)));
 }
 private static int CompareStartingTime(TimedKeyframeList first, TimedKeyframeList second)
 {
     return(System.Math.Sign(first.TimeToExecute - second.TimeToExecute));
 }
示例#5
0
 private static int CompareEndTime(TimedKeyframeList first, TimedKeyframeList second)
 {
     return System.Math.Sign((first.TimeToExecute + first.Length) - 
                             (second.TimeToExecute + second.Length));
 }
示例#6
0
 private static int CompareStartingTime(TimedKeyframeList first, TimedKeyframeList second)
 {
     return System.Math.Sign(first.TimeToExecute - second.TimeToExecute);
 }
示例#7
0
        public static void AddKeyframeToGlobalInstrutionSet(Window callingWindow)
        {
            KeyframeList keyframeList = ((KeyframeListSelectionWindow)callingWindow).SelectedKeyframeList;

            INameable targetNameable = ((KeyframeListSelectionWindow)callingWindow).SelectedNameable;

            TimedKeyframeList timedKeyframeList = new TimedKeyframeList(keyframeList, targetNameable.Name);
            timedKeyframeList.TimeToExecute = GuiData.TimeLineWindow.CurrentValue;

            // Add the selected KeyframeList to the Global InstructionSet
            EditorData.EditorLogic.CurrentAnimationSequence.Add(timedKeyframeList);

        }