// ------------------------------------------------------------------------------- public void Hide(bool instant = false) { if (mIsVisible) { if (OnHideBegin != null) { OnHideBegin.Invoke(); } UIManager.Instance.NotifyPointerExited(this); if (!instant && HideSfx != AudioManager.InvalidSfxName) { AudioManager.Instance.PlaySfx(null, HideSfx); } OnHide(instant); } }
/// <summary> /// Performed when Hide processes started. /// In inherited classes always use base.HideBegin() when overriding this method. /// </summary> protected virtual void HideBegin() { OnHideBegin.InvokeIfNotNull(); _isScreenShown = false; }