Beispiel #1
0
    public void setState(CState state)
    {
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        if (m_state != null)
        {
            m_state.exit(player);
        }
        if (state != null)
        {
            state.enter(player);
            m_state = state;
        }
    }