Esempio n. 1
0
    private void PushPanel(ITransitionCanvas newPanel)
    {
        PauseGame();

        var baseNewPanel = (MonoBehaviour)newPanel;

        // slight kludge, since we never make them inactive
        baseNewPanel.gameObject.SetActive(true);

        if (panelStack.Count > 0)
        {
            panelStack.Peek().TransitionOut();
        }

        newPanel.TransitionIn();
        panelStack.Push(newPanel);
    }
Esempio n. 2
0
    private void PushPanel(ITransitionCanvas newPanel)
    {
        //if (panelStack.Count != kMinPanelCount && panelStack.Peek() == newPanel)
        //{
        //    PopCurrentMenu();
        //}
        //else
        {
            PauseGame();

            var baseNewPanel = (MonoBehaviour)newPanel;
            // slight kludge, since we never make them inactive
            baseNewPanel.gameObject.SetActive(true);

            if (panelStack.Count > 0)
            {
                panelStack.Peek().TransitionOut();
            }

            newPanel.TransitionIn();
            panelStack.Push(newPanel);
        }
    }