public static InventoryItem ToInventoryItem(GroundedItem groundedItem, bool autoDestroyGroundedItem = false) { if (autoDestroyGroundedItem) { Object.Destroy(groundedItem.gameObject); } return(new InventoryItem(groundedItem.ItemData)); }
public static InventoryWeapon ToInventoryWeapon(GroundedItem groundedItem, bool autoDestroyGroundedItem = false) { return(ToInventoryWeapon(ToInventoryItem(groundedItem, autoDestroyGroundedItem))); }