示例#1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.tag == "Suelo")
        {
            hayPiso = true;
        }

        if (collision.tag == "Tuberia")
        {
            GetComponent <AudioSource>().Stop();
            GetComponent <AudioSource>().PlayOneShot(gameOver, 1);
            controlador.perdiste();
            juegoActivo = false;
        }
    }
示例#2
0
 private void OnCollisionEnter2D(Collision2D other)
 {
     controlador.perdiste();
 }