private void Animate() { FloatAnimator animator = gameObject.GetOrAdd <FloatAnimator>(); animator.Stop(); animator.StartAnimation(new FloatAnimationData { StartValue = startValue, EndValue = endValue, Duration = duration, EaseType = easeType, AnimationMode = mode, Target = gameObject, OnStart = (v, o) => canvasGroup.alpha = v, OnUpdate = (v, t, o) => canvasGroup.alpha = v, OnEnd = (v, o) => canvasGroup.alpha = v }); }
private void Animate() { FloatAnimator animator = gameObject.GetOrAdd <FloatAnimator>(); animator.Stop(); animator.StartAnimation(new FloatAnimationData { StartValue = startValue, EndValue = endValue, Duration = duration, EaseType = easeType, AnimationMode = mode, Target = gameObject, OnStart = rectTransform.UpdateZRotation(), OnUpdate = rectTransform.UpdateZRotationTimed(), OnEnd = rectTransform.UpdateZRotation() }); }