protected static void SetupFadeAnimation(Graphic target, TweenSequenceElement tweenAnimationElement, TweenCallback callback = null) { target.DOFade(tweenAnimationElement.GetParameterValue(0, 1f), tweenAnimationElement.duration). SetDelay(tweenAnimationElement.delay). SetEase(tweenAnimationElement.easeType).OnComplete(callback); }
protected static void SetupShakeScaleAnimation(Transform target, TweenSequenceElement tweenAnimationElement, TweenCallback callback = null) { target.DOShakeScale(tweenAnimationElement.duration, tweenAnimationElement.GetParameterValue(0, 1f), (int)tweenAnimationElement.GetParameterValue(1, 10f), tweenAnimationElement.GetParameterValue(2, 90f)). SetDelay(tweenAnimationElement.delay). SetEase(tweenAnimationElement.easeType). OnComplete(callback); }