diff --git a/xiaofang/Assets/Prefabs/HYLPrefabs/TaskItem.cs b/xiaofang/Assets/Prefabs/HYLPrefabs/TaskItem.cs index cfd2193c..365ef2c0 100644 --- a/xiaofang/Assets/Prefabs/HYLPrefabs/TaskItem.cs +++ b/xiaofang/Assets/Prefabs/HYLPrefabs/TaskItem.cs @@ -58,6 +58,7 @@ public class TaskItem : MonoBehaviour { taskId = id; jr = js; + UpdateTxt(); } @@ -65,8 +66,8 @@ public class TaskItem : MonoBehaviour { Task_ info = jr.GetTaskByID(taskId); - - tasktxt.text = info.Name; + Debug.Log(info); + tasktxt.text = info.Note; } diff --git a/xiaofang/Assets/Script/JSONReader/JSONReader.cs b/xiaofang/Assets/Script/JSONReader/JSONReader.cs index c955bb6f..b114d1df 100644 --- a/xiaofang/Assets/Script/JSONReader/JSONReader.cs +++ b/xiaofang/Assets/Script/JSONReader/JSONReader.cs @@ -56,26 +56,26 @@ public class JSONReader : MonoBehaviour // 解析 JSON 字符串为 Task 数据 public Dictionary TaskJSON(string json) { - NPCData[] npcArray = JsonHelper.FromJson(json); + Task_[] npcArray = JsonHelper.FromJson(json); Dictionary selectDictionary = new Dictionary(); foreach (var npc in npcArray) { - npcDictionary[npc.ID] = npc; + TaskDictionary[npc.ID] = npc; } - return selectDictionary; + return TaskDictionary; } // 解析 JSON 字符串为 Select 数据 public Dictionary SelectJSON(string json) { - NPCData[] npcArray = JsonHelper.FromJson(json); + Select[] npcArray = JsonHelper.FromJson