Пример #1
0
 public KeyFramePlaybackDesc(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f, float velocity = 1.0f)
 {
     Animation = animation;
     Cursor    = cursor ?? animation.GetCursor(0);
     Blend     = blend;
     Velocity  = velocity;
 }
Пример #2
0
        public SecuenceNode Playing(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f)
        {
            KeyFramePlaybackDesc b = new KeyFramePlaybackDesc(animation, cursor, blend);

            _animations.Add(b);
            return(this);
        }
Пример #3
0
        public KeyFrameAnimationPlayback AddAnimation(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f, float velocity = 1.0f)
        {
            var desc = new KeyFramePlaybackDesc(animation, cursor, blend, velocity);

            _animations.AddLast(desc);
            return(this);
        }
Пример #4
0
        public KeyFrameCursor GetCursor(KeyFrameAnimation animation)
        {
            KeyFramePlaybackDesc desc;

            GetPlayback(animation, out desc);
            return(desc.Cursor);
        }
Пример #5
0
 public KeyFrameCursor(KeyFrameAnimation animation)
 {
     if (animation == null)
     {
         throw new ArgumentNullException("animation");
     }
     _animation = animation;
 }
Пример #6
0
 public void UnLinkAnimation(KeyFrameAnimation animation)
 {
     foreach (var curves in animation.Nodes)
     {
         UnLinkAnimationCurve(curves);
         foreach (var curve in curves.Curves)
         {
             UnLinkOutput(curve);
         }
     }
 }
Пример #7
0
        public bool RemoveAnimation(KeyFrameAnimation animation)
        {
            var node = _animations.GetLinkedNode(x => x.Animation == animation);

            if (node != null)
            {
                _animations.Remove(node);
                return(true);
            }
            return(false);
        }
Пример #8
0
        public bool GetPlayback(KeyFrameAnimation animation, out KeyFramePlaybackDesc desc)
        {
            var node = _animations.GetLinkedNode(x => x.Animation == animation);

            if (node != null)
            {
                desc = node.Value;
                return(true);
            }
            desc = new KeyFramePlaybackDesc();
            return(false);
        }
Пример #9
0
        public SecuenceNode Playing(KeyFrameAnimation animation, float startTime, float duration, AnimationLooping loop, float blend = 1.0f)
        {
            KeyFrameCursor cursor = new KeyFrameCursor(animation)
            {
                StartTime = startTime,
                EndTime   = startTime + duration,
                Looping   = loop
            };
            KeyFramePlaybackDesc b = new KeyFramePlaybackDesc(animation, cursor, blend);

            _animations.Add(b);
            return(this);
        }
Пример #10
0
        public KeyFrameAnimationPlayback AddAnimation(KeyFrameAnimation animation, float startTime, float duration, AnimationLooping loop, float blend = 1.0f, float velocity = 1.0f)
        {
            KeyFrameCursor cursor = new KeyFrameCursor(animation)
            {
                StartTime = startTime,
                EndTime   = startTime + duration,
                Looping   = loop
            };
            KeyFramePlaybackDesc b = new KeyFramePlaybackDesc(animation, cursor, blend, velocity);

            _animations.AddLast(b);
            return(this);
        }
Пример #11
0
 public SecuenceNode(string name, KeyFrameAnimation animation, float startTime, float duration, AnimationLooping loop, float blend = 1.0f)
     : this(name)
 {
     Playing(animation, startTime, duration, loop, blend);
 }
Пример #12
0
 public KeyFrameAnimationPlayback(KeyFrameAnimation animation, float startTime, float duration, AnimationLooping loop, float blend = 1.0f, float velocity = 1.0f)
 {
     AddAnimation(animation, startTime, duration, loop, blend, velocity);
 }
Пример #13
0
 public KeyFrameAnimationPlayback(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f, float velocity = 1.0f)
 {
     AddAnimation(animation, cursor, blend, velocity);
 }
Пример #14
0
 public static KeyFrameCursor Create(KeyFrameAnimation animation)
 {
     return(new KeyFrameCursor(animation));
 }