public void Stop(UIAnimator animator, bool reset = false) { if (animatePosition) { animator.PositionTweener.StopTween(reset); } if (animateAnchors) { animator.AnchorsTweener.StopTween(reset); } if (animateRotation) { animator.RotationTweener.StopTween(reset); } if (animateSize) { animator.SizeTweener.StopTween(reset); } if (animateScale) { animator.ScaleTweener.StopTween(reset); } if (animateAlpha) { animator.AlphaTweener.StopTween(reset); } }
public void Animate(UIAnimator animator, Action callback = null, UIAnimationOptions animationOptions = null) { if (animationOptions == null) { animationOptions = new UIAnimationOptions(savePosition, Duration == 0, _customEasingFunction, Duration, Delay); } if (animatePosition) { animator.Move(positionDelta, positionAnimationDirection, callback, animationOptions); callback = null; } if (animateAnchors) { animator.MoveAnchors(minAnchorDelta, maxAnchorDelta, anchorsAnimationDirection, callback, animationOptions); callback = null; } if (animateRotation) { animator.Rotate(rotationDelta, rotationAnimationDirection, callback, animationOptions); callback = null; } if (animateSize) { animator.Resize(sizeDelta, sizeAnimationDirection, callback, animationOptions); callback = null; } if (animateScale) { animator.Scale(scaleDelta, scaleAnimationDirection, callback, animationOptions); callback = null; } if (animateAlpha) { animator.Fade(alphaDelta, alphaAnimationDirection, callback, animationOptions); callback = null; } callback?.Invoke(); }