void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { hearts.gainHealth(); Destroy(this.gameObject); } }
void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { hearts.gainHealth(); Destroy(this.gameObject); } }