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; } }
private void OnCollisionEnter2D(Collision2D other) { controlador.perdiste(); }