updated the onKilled and onPickUp methods of the bone class