private void OnTriggerEnter(Collider other) { ItemPickup itemPickup = other.gameObject.GetComponent <ItemPickup>(); if (itemPickup != null) { itemPickup.pickupItem(); } }
private void OnTriggerEnter(Collider other) { ItemPickup itemPickup = other.gameObject.GetComponent <ItemPickup>(); if (itemPickup != null) { itemPickup.pickupItem(); } }