public SaveInventory(List <Item> itemList) { items = new SaveItem[itemList.Count]; for (int i = 0; i < itemList.Count; i++) { var item = new SaveItem(itemList[i]); items[i] = item; } }
public SaveMachineObject(MachineObject machine) { item = new SaveItem(machine.item); position = new SaveVector3(machine.transform.position); saveInventory = new SaveInventory(machine.inventoryManager.inventory.itemCollection); }