Esempio n. 1
0
    void OnCollisionEnter2D(Collision2D collision)
    {
        GameObject go = collision.gameObject;

        if (go.CompareTag("Roof"))
        {
            return;
        }
        if (go.CompareTag("Blocker"))
        {
            Blocker.DisableAll();
            Die();
        }
        if (go.CompareTag("Ground"))
        {
            Die();
            scene.EnterGameover();
        }
    }