Added inventory load, fixed inventory save, v1.3.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user