Ejemplo n.º 1
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);
        }
        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);
        }
 public KeyFramePlaybackDesc(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f, float velocity = 1.0f)
 {
     this.Animation = animation;
     this.Cursor    = cursor ?? animation.GetCursor(0);
     this.Blend     = blend;
     this.Velocity  = velocity;
 }
        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");
     }
     this._animation = animation;
 }
        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.º 7
0
 public void UnLinkAnimation(KeyFrameAnimation animation)
 {
     foreach (var curves in animation.Nodes)
     {
         UnLinkAnimationCurve(curves);
         foreach (var curve in curves.Curves)
         {
             UnLinkOutput(curve);
         }
     }
 }
        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);
        }
        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 static KeyFrameCursor Create(KeyFrameAnimation animation)
 {
     return(new KeyFrameCursor(animation));
 }
 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);
 }
 public KeyFrameAnimationPlayback(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f, float velocity = 1.0f)
 {
     AddAnimation(animation, cursor, blend, velocity);
 }