Esempio n. 1
0
        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();
                }
            }
        }
Esempio n. 2
0
        public void Pop()
        {
            if (_contextStack.Count != 0)
            {
                BaseContext curContext = _contextStack.Peek();
                _contextStack.Pop();

                BaseView curView = UIManager.Instance.GetSingleUI(curContext.ViewType).GetComponent <BaseView>();
                curView.OnExit(curContext);
            }

            if (_contextStack.Count != 0)
            {
                BaseContext lastContext = _contextStack.Peek();
                BaseView    curView     = UIManager.Instance.GetSingleUI(lastContext.ViewType).GetComponent <BaseView>();
                curView.OnResume(lastContext);
            }
        }
Esempio n. 3
0
        public void Pop()
        {
            UIType curType  = UIType.None;
            UIType nextType = UIType.None;

            if (_contextStack.Count != 0)
            {
                BaseContext curContext = _contextStack.Peek();
                _contextStack.Pop();
                BaseView curView = UIManager.Instance.GetSingleUI(curContext.ViewType).GetComponent <BaseView>();
                curView.OnExit(curContext);
            }

            if (_contextStack.Count != 0)
            {
                BaseContext lastContext = _contextStack.Peek();
                curType     = lastContext.ViewType;
                _curContext = lastContext;
                BaseView curView = UIManager.Instance.GetSingleUI(lastContext.ViewType).GetComponent <BaseView>();
                curView.transform.SetAsLastSibling();
                if (!curView.hasEnter)
                {
                    curView.OnEnter(lastContext);
                    curView.OnPause(lastContext);
                }
                curView.OnResume(lastContext);
                if (curView.closeOtherUI)
                {
                    UIManager.Instance.CloseAllUI();
                }
                if (!UIManager.Instance.activeView.Contains(curView))
                {
                    UIManager.Instance.activeView.Add(curView);
                }
            }
            DisableInstant();
            UIManager.Instance.commonUIManager.Refresh(curType, nextType);
        }