Finished load and save mechanic, v1.3.0
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -33,6 +34,19 @@ namespace Assets.Scripts.Slimes
|
||||
level = playerStats[7];
|
||||
}
|
||||
|
||||
public BasicSlime(JToken json)
|
||||
{
|
||||
maxHealth = (int)json["maxHealth"];
|
||||
maxSecondary = (int)json["maxSecondary"];
|
||||
secondary = (int)json["secondary"];
|
||||
health = (int)json["health"];
|
||||
strength = (int)json["strength"];
|
||||
dexterity = (int)json["dexterity"];
|
||||
intelligence = (int)json["intelligence"];
|
||||
level = (int)json["level"];
|
||||
experience = (int)json["experience"];
|
||||
}
|
||||
|
||||
public int[] getStats()
|
||||
{
|
||||
int[] result = { health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence };
|
||||
|
||||
Reference in New Issue
Block a user