comando para coger un objeto haciendolo desaparecer tras una animacion
if (collision.gameObject.tag == "Player") { collision.gameObject.GetComponent<PlayerController>().AddScore(score); collision.gameObject.GetComponent<PlayerController>().AddHealth(health); Destroy(gameObject, destroyTime); } else { Destroy(gameObject, destroyTime); }