/// <internalonly /> protected override void StopCore(bool completed, ProceduralAnimationStopState stopState) { if (completed == false) { ProceduralAnimation animation = _animations[_current]; animation.OnStop(/* completed */ false, stopState); } }
private void StopCore(ProceduralAnimation animation, ProceduralAnimationStopState stopState) { animation.OnStop(/* completed */ false, stopState); _activeAnimations.Remove(animation); if (_activeAnimations.Count == 0) { _sb.Stop(); } }
internal void OnStop(bool completed, ProceduralAnimationStopState stopState) { StopCore(completed, stopState); _completed = completed; _isPlaying = false; PerformCleanup(); if (Stopped != null) { Stopped(this, EventArgs.Empty); } }
/// <internalonly /> protected override void StopCore(bool completed, ProceduralAnimationStopState stopState) { if (completed == false) { foreach (ProceduralAnimation animation in _animations) { if (animation.IsPlaying) { animation.OnStop(/* completed */ false, stopState); } } } }
/// <internalonly /> protected override sealed void StopCore(bool completed, ProceduralAnimationStopState stopState) { if (completed == false) { if (stopState == ProceduralAnimationStopState.Complete) { PerformTweening(1f); } else if (stopState == ProceduralAnimationStopState.Revert) { PerformTweening(0f); } } }
/// <summary> /// Stops the animation when it is no longer scheduled to continue playing. /// </summary> /// <param name="completed">Whether the animation has completed naturally.</param> /// <param name="stopState">The state in which the animation should end if it was interrupted.</param> protected abstract void StopCore(bool completed, ProceduralAnimationStopState stopState);
/// <summary> /// Stops playing the animation mid-way. The specified stopState determines /// the state in which the element being animated is left in. /// </summary> /// <param name="stopState">The state of the element upon stopping the animation.</param> public void Stop(ProceduralAnimationStopState stopState) { ProceduralAnimationController.Stop(this, stopState); _controller = null; }
public static void Stop(ProceduralAnimation animation, ProceduralAnimationStopState stopState) { animation.Controller.StopCore(animation, stopState); }