Example #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;
 }
Example #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);
        }
Example #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);
        }
Example #4
0
        public KeyFrameCursor GetCursor(KeyFrameAnimation animation)
        {
            KeyFramePlaybackDesc desc;

            GetPlayback(animation, out desc);
            return(desc.Cursor);
        }
Example #5
0
 public KeyFrameCursor(KeyFrameAnimation animation)
 {
     if (animation == null)
     {
         throw new ArgumentNullException("animation");
     }
     _animation = animation;
 }
Example #6
0
 public void UnLinkAnimation(KeyFrameAnimation animation)
 {
     foreach (var curves in animation.Nodes)
     {
         UnLinkAnimationCurve(curves);
         foreach (var curve in curves.Curves)
         {
             UnLinkOutput(curve);
         }
     }
 }
Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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);
 }
Example #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);
 }
Example #13
0
 public KeyFrameAnimationPlayback(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f, float velocity = 1.0f)
 {
     AddAnimation(animation, cursor, blend, velocity);
 }
Example #14
0
 public static KeyFrameCursor Create(KeyFrameAnimation animation)
 {
     return(new KeyFrameCursor(animation));
 }