public void Load(string file) { if (!IsLoaded) { PersonalImprovementJsonData jsonData = JsonConvert.DeserializeObject <PersonalImprovementJsonData>(Resources.Load <TextAsset>(file).text); Data.Copy(jsonData); IsLoaded = true; } }
public void Copy(PersonalImprovementJsonData data) { ConvertData = new PersonalConvertData(data.convertData); //Products = new Dictionary<ProductType, List<ProductData>>(); //foreach (var kvp in data.products) { // Products.Add((ProductType)kvp.Key, kvp.Value.Select(o => new ProductData(o)).ToList()); //} StatusPoints = data.statusPoints.Select(sp => new StatusPointData(sp)).ToList(); }
public PersonalImprovementsData(PersonalImprovementJsonData data) { Copy(data); }