public void ReverseAnimation(Action callback) { EnterAnimation.Stop(); EnterAnimation .SetScale(Vector3.one, new Vector3(0, 1, 1)) .SetDuration(0.25f) .SetEaseType(Ease.Type.InBack); EnterAnimation.Play(callback); }
public void PlayAnimation(Action callback) { gameObject.SetActive(true); EnterAnimation.Stop(); EnterAnimation .SetScale(new Vector3(0, 1, 1), Vector3.one) .SetDuration(0.4f) .SetEaseType(Ease.Type.OutElastic); EnterAnimation.Play(callback); }