/// <summary> /// Disables the component after duration seconds. /// </summary> /// <returns>The animation pipeline.</returns> /// <param name="pipeline">The animation pipeline.</param> public static IAnimationPipeline <TOwner> Disable <TOwner>(this IAnimationPipeline <TOwner> pipeline) where TOwner : IComponent { return(pipeline.Do(() => { pipeline.Owner.Enabled = false; })); }
/// <summary> /// Enables the component. /// </summary> /// <returns>The animation pipeline.</returns> /// <param name="pipeline">The animation pipeline.</param> public static IAnimationPipeline <TComponent> Enable <TComponent>(this IAnimationPipeline <TComponent> pipeline) where TComponent : IComponent { return(pipeline.Do(() => { pipeline.Owner.Enabled = true; })); }