コード例 #1
0
        public void PushPanel(UIPanelType panelType)
        {
            if (panelStack == null)
            {
                panelStack = new Stack <BasePanel>();
            }

            if (panelStack.Count > 0)
            {
                BasePanel topPanel = panelStack.Peek();
                topPanel.OnPause();
            }

            BasePanel panel = GetPanel(panelType);

            panel.OnEnter();
            panelStack.Push(panel);
        }
コード例 #2
0
        public void PopPanel()
        {
            if (panelStack == null)
            {
                panelStack = new Stack <BasePanel>();
            }

            if (panelStack.Count == 0)
            {
                return;
            }

            BasePanel topPanel01 = panelStack.Pop();

            topPanel01.OnExit();

            if (panelStack.Count == 0)
            {
                return;
            }
            BasePanel topPanel02 = panelStack.Peek();

            topPanel02.OnContinue();
        }