Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        public KeyFrameCursor GetCursor(KeyFrameAnimation animation)
        {
            KeyFramePlaybackDesc desc;

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