예제 #1
0
 public void Hide(bool force)
 {
     ResetTweener();
     if (_shown)
     {
         _tweener = CachedCanvasGroup.DOFade(0, FadeTime).SetDelay(WaitTime).OnComplete(OnHideComplete);
         _shown   = false;
         _inHide  = true;
     }
     else if (force)
     {
         gameObject.SetActive(false);
     }
 }
예제 #2
0
 public void Show(bool force, Color fadeColor)
 {
     ResetTweener();
     if (!_shown)
     {
         CachedImage.color = fadeColor;
         gameObject.SetActive(true);
         if (force)
         {
             CachedCanvasGroup.alpha = 1;
             _inShow = true;
             OnShowComplete();
         }
         else
         {
             _tweener = CachedCanvasGroup.DOFade(1, FadeTime).SetDelay(WaitTime).OnComplete(OnShowComplete);
             _inShow  = true;
         }
     }
 }