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); } }
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; } } }