private void OnCollisionEnter(Collision other) { if (!other.gameObject.CompareTag("Player")) { return; } if (_itemSpawner) { _itemSpawner.ItemTaken(other.gameObject); } else { Destroy(gameObject); } }