Esempio n. 1
0
        public void PushPanel(MenuPanel panel)
        {
            if (null != _currentPanel)
            {
                _currentPanel.gameObject.SetActive(false);
                _panelStack.Push(_currentPanel);
            }

            _currentPanel = panel;
            _currentPanel.gameObject.SetActive(true);
        }
Esempio n. 2
0
        public void PopPanel()
        {
            if (_panelStack.Count < 1)
            {
                return;
            }

            _currentPanel.gameObject.SetActive(false);

            _currentPanel = _panelStack.Pop();
            _currentPanel.gameObject.SetActive(true);
        }