override public void Read(string str) { List <object> jsons = Json.Deserialize(str) as List <object>; for (int i = 0; i < jsons.Count; i++) { Dictionary <string, object> data = jsons[i] as Dictionary <string, object>; NpcVo vo = new NpcVo(); vo.Id = uint.Parse((string)data["Id"]); vo.Icon = (string)data["Icon"]; vo.Name = (string)data["Name"]; vo.Bubble = (string)data["Bubble"]; vo.Dialogue = (string)data["Dialogue"]; vo.EventType = uint.Parse((string)data["EventType"]); vo.EventValue = (string)data["EventValue"]; items.Add(vo.Id.ToString(), vo); } }
private void Awake() { npcVo = NpcCFG.items[npcId.ToString()]; }