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; }
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 KeyFrameCursor GetCursor(KeyFrameAnimation animation) { KeyFramePlaybackDesc desc; GetPlayback(animation, out desc); return(desc.Cursor); }
public KeyFrameCursor(KeyFrameAnimation animation) { if (animation == null) { throw new ArgumentNullException("animation"); } _animation = animation; }
public void UnLinkAnimation(KeyFrameAnimation animation) { foreach (var curves in animation.Nodes) { UnLinkAnimationCurve(curves); foreach (var curve in curves.Curves) { UnLinkOutput(curve); } } }
public bool RemoveAnimation(KeyFrameAnimation animation) { var node = _animations.GetLinkedNode(x => x.Animation == animation); if (node != null) { _animations.Remove(node); return(true); } return(false); }
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); }
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); }
public SecuenceNode(string name, KeyFrameAnimation animation, float startTime, float duration, AnimationLooping loop, float blend = 1.0f) : this(name) { Playing(animation, startTime, duration, loop, blend); }
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); }
public static KeyFrameCursor Create(KeyFrameAnimation animation) { return(new KeyFrameCursor(animation)); }