public void Hide(bool skipAnimation = false) { if (skipAnimation) { closeEvent.Complete(this); OnCloseAnimationCompleteCallback(); return; } if (animationCoroutine != null) { StopCoroutine(animationCoroutine); } animationCoroutine = StartCoroutine( closeEvent.RunAnimation(this, OnCloseAnimationCompleteCallback)); }
public void Show(bool skipAnimation = false) { gameObject.SetActive(true); if (skipAnimation) { openEvent.Complete(this); OnOpenAnimationCompleteCallback(); return; } if (animationCoroutine != null) { StopCoroutine(animationCoroutine); } animationCoroutine = StartCoroutine( openEvent.RunAnimation(this, OnOpenAnimationCompleteCallback)); }