/// <summary> /// set suitDic by json data. /// </summary> void LoadSuitDic() { string tmp; tmp = LoadJsonFile("Data/Suit"); JsonData jd = JsonMapper.ToObject(tmp); int id = 0; for (int i = 0; i < jd.Count; i++) { SuitInfoJson sij = new SuitInfoJson(); id = int.Parse(jd[i]["id"].ToString()); sij.name = jd[i]["name"].ToString(); // attr[0] ~ attr[5] sij.attr.Add(int.Parse(jd[i]["atk"].ToString())); sij.attr.Add(int.Parse(jd[i]["def"].ToString())); sij.attr.Add(int.Parse(jd[i]["agi"].ToString())); sij.attr.Add(int.Parse(jd[i]["sync"].ToString())); sij.attr.Add(int.Parse(jd[i]["insight"].ToString())); sij.attr.Add(int.Parse(jd[i]["rare"].ToString())); sij.context = jd[i]["context"].ToString(); suitDic.Add(id, sij); } }