private void OnTriggerEnter2D(Collider2D collisor) { if (collisor.tag == "Mosquitos") { collisor.GetComponent <Item>().InstanciarDestruir(); Audio(clipMosquito); pontos.Hit(); } }
void OnMouseDown() { switch (gameObject.tag) { case "badfood": GetComponent <AudioSource> ().Play(); Destroy(gameObject); if (!vidas.Remover()) { pontos.Recorde(); } break; case "Goodfood": pontos.Hit(); Destroy(gameObject); break; default: break; } }