Exemplo n.º 1
0
        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
            });
        }
Exemplo n.º 2
0
        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()
            });
        }