Example #1
0
    public void ChangeState(GameplayState state)
    {
        if (m_state != null)
        {
            m_state.Leave();
        }

        m_state = state;

        if (m_state != null)
        {
            m_state.Enter();
        }
    }