Ejemplo n.º 1
0
    public void PopMenuState()
    {
        if (m_menuState)
        {
            Debug.Log("Pop State: " + m_menuState);
            //			m_previousState = m_gameState.state;
            m_menuState.OnDeactivate();
        }

        if (m_menuStateStack.Count > 1)
        {
            m_menuStateStack.RemoveAt(m_menuStateStack.Count - 1);
            m_menuState = m_menuStateStack[m_menuStateStack.Count - 1];

            if (m_menuState != null)
            {
                Debug.Log("New State: " + m_menuState);
                m_menuState.OnReturn();
            }
        }
    }