/// <summary> /// Animates the floot value between the values defined in to and from arguments. /// </summary> /// <returns>The animation pipeline.</returns> /// <param name="component">Component.</param> /// <param name="from">From.</param> /// <param name="to">To.</param> /// <param name="duration">Duration.</param> /// <param name="easing">Easing.</param> /// <param name="callback">Callback.</param> public static IAnimationPipeline <TOwner> To <TOwner>(this TOwner component, float from, float to, float duration, IEasing easing, Action <float> callback) where TOwner : IComponent { var animation = new FloatAnimation <TOwner>(component, from, to, duration, callback); animation.Easing = easing; return(AnimationPipeline <TOwner> .Create(animation)); }
/// <summary> /// Animates the floot value between the values defined in to and from arguments. /// </summary> /// <returns>The animation pipeline.</returns> /// <param name="pipeline">The animation pipeline.</param> /// <param name="from">From.</param> /// <param name="to">To.</param> /// <param name="duration">Duration.</param> /// <param name="easing">Easing.</param> /// <param name="callback">Callback.</param> public static IAnimationPipeline <TOwner> To <TOwner>(this IAnimationPipeline <TOwner> pipeline, float from, float to, float duration, IEasing easing, Action <float> callback) where TOwner : IComponent { var animation = new FloatAnimation <TOwner>(pipeline.Owner, from, to, duration, callback); animation.Easing = easing; pipeline.Add(animation); return(pipeline); }