public void CloseOpenPopup() { UIBaseState popupBaseState = this._fsm.CurrentState as UIBaseState; if (popupBaseState != null) { popupBaseState.ClosePopup(); } }
private void OpenPopupNow(UIViewRequest request) { if (!request.IsValid) { this.TryOpenNextPopup(); return; } UIBaseState popupBaseState = (UIBaseState)this._fsm.GetState(request.PopupType); if (this._fsm.CurrentState == popupBaseState) { return; } this._fsm.SwitchState(popupBaseState); if (this._fsm.CurrentState == popupBaseState) { UIViewBackground.gameObject.SetActive(true); popupBaseState.OpenPopup(request); popupBaseState.transform.parent.SetAsLastSibling(); return; } Debug.LogWarning("State change unsuccessfull! PopupManager may have become corrupted"); }