Added inventory load, fixed inventory save, v1.3.0

This commit is contained in:
Nicola Sovic
2022-07-04 13:24:54 +02:00
parent 22137fffde
commit 349e023cbf
6 changed files with 193 additions and 39 deletions

View File

@@ -1,3 +1,4 @@
using Newtonsoft.Json.Linq;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -275,5 +276,18 @@ namespace Assets.Scripts
}
return result;
}
public void loadSlot(JToken json, int bag)
{
if (bag == -1)
{
equip = new Item(json);
}
else
{
items[bag] = new Item(json);
}
}
}
}