public static void AddSequence(string name, AnimationSequence.AnimationSequenceType sequenceType, bool loops)
        {
            AnimationSequence newSequence = new AnimationSequence(sequenceType);
            newSequence.Loops = loops;

            Sequences.Add(name, newSequence);
        }
        protected virtual void Deserialize(Serializer serializer)
        {
            _currentKeyframeIndex = serializer.GetDataItem <int>("current-frame-index");
            _currentKeyframeMillisecondsElapsed = serializer.GetDataItem <float>("current-frame-elapsed");

            _sequence       = new AnimationSequence(serializer.GetDataItem <AnimationSequence.AnimationSequenceType>("sequence-type"));
            _sequence.Loops = serializer.GetDataItem <bool>("loop-sequence");

            XElement frames = serializer.GetDataElement("keyframes");

            if (frames != null)
            {
                foreach (XElement frame in frames.Elements("keyframe"))
                {
                    _sequence.Keyframes.Add(DeserializeKeyframe(frame));
                }
            }
        }
        protected virtual void Deserialize(Serializer serializer)
        {
            _currentKeyframeIndex = serializer.GetDataItem<int>("current-frame-index");
            _currentKeyframeMillisecondsElapsed = serializer.GetDataItem<float>("current-frame-elapsed");

            _sequence = new AnimationSequence(serializer.GetDataItem<AnimationSequence.AnimationSequenceType>("sequence-type"));
            _sequence.Loops = serializer.GetDataItem<bool>("loop-sequence");

            XElement frames = serializer.GetDataElement("keyframes");
            if (frames != null)
            {
                foreach (XElement frame in frames.Elements("keyframe")) { _sequence.Keyframes.Add(DeserializeKeyframe(frame)); }
            }
        }