Esempio n. 1
0
    //SERIALIZATION
    public void SerializeInventory()
    {
        inventoryData = Hero.active.data.inventoryData;

        //saves the ids of all items
        foreach (var item in items)
        {
            inventoryData.AddId(item.ID);
        }

        //saves the ids of all samples
        foreach (var sample in samples)
        {
            inventoryData.AddSampleId(sample.Id);
        }
    }