Merge branch 'main' of http://shu.sheziwanglo.cn:3000/wulongxiao/_xiaofang
# Conflicts: # xiaofang/Assets/Script/JSONReader/JSONReader.cs # xiaofang/Assets/Script/UI/TemplateInfo.cs
This commit is contained in:
commit
328c69e877
@ -53,6 +53,20 @@ public class JSONReader : MonoBehaviour
|
||||
GetNpcDataByID(8001);
|
||||
}
|
||||
|
||||
// 解析 JSON 字符串为 Task 数据
|
||||
public Dictionary<string, Task_> TaskJSON(string json)
|
||||
{
|
||||
NPCData[] npcArray = JsonHelper.FromJson<NPCData>(json);
|
||||
Dictionary<string, Task_> selectDictionary = new Dictionary<string, Task_>();
|
||||
|
||||
foreach (var npc in npcArray)
|
||||
{
|
||||
npcDictionary[npc.ID] = npc;
|
||||
}
|
||||
|
||||
return selectDictionary;
|
||||
}
|
||||
|
||||
// 解析 JSON 字符串为 Select 数据
|
||||
public Dictionary<string, Select> SelectJSON(string json)
|
||||
{
|
||||
@ -173,21 +187,6 @@ public class JSONReader : MonoBehaviour
|
||||
return locationDictionary;
|
||||
}
|
||||
|
||||
|
||||
// 解析 JSON 字符串为 Task 数据
|
||||
public Dictionary<string, Task_> TaskJSON(string json)
|
||||
{
|
||||
NPCData[] npcArray = JsonHelper.FromJson<NPCData>(json);
|
||||
Dictionary<string, Task_> taskDictionary = new Dictionary<string, Task_>();
|
||||
|
||||
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_
|
||||
{
|
||||
|
@ -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()
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user