void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { hud = GameObject.Find("GUIMenu").GetComponent<GUIMenu>(); hud.IncreaseHuesos(1); Destroy(this.gameObject); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { hud = GameObject.Find("GUIMenu").GetComponent<GUIMenu>(); hud.IncreaseHuesos(1); Destroy(this.gameObject); } }