// ------------------------------------------------------------------------------- public void Show(bool instant = false) { if (!mIsVisible && mIsEnabled) { if (OnShowBegin != null) { OnShowBegin.Invoke(); } if (!instant && ShowSfx != AudioManager.InvalidSfxName) { AudioManager.Instance.PlaySfx(null, ShowSfx); } OnShow(); } }
/// <summary> /// Performed when Show processes started. /// In inherited classes always use base.ShowBegin() when overriding this method. /// </summary> protected virtual void ShowBegin() { OnShowBegin.InvokeIfNotNull(); _isScreenShown = true; }