Пример #1
0
        public static Coroutine Fade(this UGUIParts self, float duration, float targetAlpha)
        {
            var startAlpha = self.Alpha;

            return(self.StartCoroutine(KKUtilities.FloatLerp(duration, (t) =>
            {
                self.Alpha = Mathf.Lerp(startAlpha, targetAlpha, Easing.InQuad(t));
            })));
        }
Пример #2
0
 public static Coroutine PopUp(this UGUIParts self, float duration)
 {
     self.transform.localScale = Vector3.zero;
     self.gameObject.SetActive(true);
     return(self.StartCoroutine(KKUtilities.FloatLerp(duration, (t) =>
     {
         self.transform.localScale = Vector3.LerpUnclamped(Vector3.zero, Vector3.one, Easing.OutBack(t));
     })));
 }