private void OnTriggerEnter2D(Collider2D collider) { if (collider.tag == "Player") { Debug.Log($"{name} collected."); score.AddCrystals(value); Destroy(gameObject); } }
private void OnTriggerEnter2D(Collider2D collider) { if (collider.tag == "Player") { Debug.Log($"{name} collected."); score.AddCrystals(value); Destroy(gameObject); } }