public void LineExit() { BaseView view = null; foreach (BaseContext item in _contextStack) { view = UIManager.Instance.GetSingleUI(item.ViewType).GetComponent <BaseView>(); view.OnExit(item); if (item != _curContext) { view.ForceDisable(); } } }
//同一时间最多显示两个UI void DisableInstant() { List <UIType> UIPool = UIManager.Instance._UIPool; if (UIPool.Count <= 2) { return; } if (UIPool [UIPool.Count - 3] != UIPool [UIPool.Count - 2] && UIPool [UIPool.Count - 3] != UIPool [UIPool.Count - 1]) { GameObject endObj = UIManager.Instance.TryGetSingleUI(UIPool[UIPool.Count - 3]); if (endObj == null) { return; } BaseView endView = UIManager.Instance.TryGetSingleUI(UIPool[UIPool.Count - 3]).GetComponent <BaseView>(); if (endView != null) { endView.ForceDisable(); } } }