diff --git a/xiaofang/Assets/Script/JSONReader/JSONReader.cs b/xiaofang/Assets/Script/JSONReader/JSONReader.cs index 413bb603..c3aaa6fa 100644 --- a/xiaofang/Assets/Script/JSONReader/JSONReader.cs +++ b/xiaofang/Assets/Script/JSONReader/JSONReader.cs @@ -53,6 +53,20 @@ public class JSONReader : MonoBehaviour GetNpcDataByID(8001); } + // 解析 JSON 字符串为 Task 数据 + public Dictionary TaskJSON(string json) + { + NPCData[] npcArray = JsonHelper.FromJson(json); + Dictionary selectDictionary = new Dictionary(); + + foreach (var npc in npcArray) + { + npcDictionary[npc.ID] = npc; + } + + return selectDictionary; + } + // 解析 JSON 字符串为 Select 数据 public Dictionary SelectJSON(string json) { @@ -173,21 +187,6 @@ public class JSONReader : MonoBehaviour return locationDictionary; } - - // 解析 JSON 字符串为 Task 数据 - public Dictionary TaskJSON(string json) - { - NPCData[] npcArray = JsonHelper.FromJson(json); - Dictionary taskDictionary = new Dictionary(); - - foreach (var npc in npcArray) - { - npcDictionary[npc.ID] = npc; - } - - return taskDictionary; - } - //将所有的数据都拿出来方便调用 // 根据给定的ID获取对应的NPC数据,并返回字典中所有数据 public void GetNpcDataByID(int id) @@ -470,8 +469,6 @@ public class Select // 其他字段可根据需要添加 } - - [System.Serializable] public class Task_ { diff --git a/xiaofang/Assets/Script/UI/TemplateInfo.cs b/xiaofang/Assets/Script/UI/TemplateInfo.cs index 6589bc6e..6a15024e 100644 --- a/xiaofang/Assets/Script/UI/TemplateInfo.cs +++ b/xiaofang/Assets/Script/UI/TemplateInfo.cs @@ -5,7 +5,17 @@ using UnityEngine.UI; public class TemplateInfo : MonoBehaviour { +<<<<<<< HEAD public Text templateText; +======= +//<<<<<<< HEAD:xiaofang/Assets/Script/hylScripts/Free01/NetPings.cs + + +//======= + public Text templateText; +//>>>>>>> e0ef89a8cfb64341378541f16f1e9f5cffbc01eb:xiaofang/Assets/Script/UI/TemplateInfo.cs + // Start is called before the first frame update +>>>>>>> f0b9f206aabafd00c78d6374b48d4057bbe57cf6 void Start() {