private void OnTriggerEnter(Collider other) { IPickable pickable = other.GetComponent <IPickable>(); if (pickable != null) { pickable.PickUpObject(); } }