Taskjson的添加和Language文件的更新

This commit is contained in:
huyulong 2024-12-11 16:05:50 +08:00
parent 480d7d6338
commit f0b9f206aa
5 changed files with 3458 additions and 10 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4dec25769ed4ed3469693b1c881248af
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1574,23 +1574,23 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_SizeDelta.x
value: 354
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchoredPosition.x
value: 177
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchoredPosition.y
value: -32.2326
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368487729838770152, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_SizeDelta.y
@ -20283,6 +20283,7 @@ MonoBehaviour:
NPCJosnFile: {fileID: 4900000, guid: 41009f009f0718647a782c7e1aec97dd, type: 3}
LanguageJsonFile: {fileID: 4900000, guid: 62a41129c4663ee41a06274114d28feb, type: 3}
SelectJsonFile: {fileID: 4900000, guid: 3efd15f4195557144a45659d2baa1ba3, type: 3}
TaskJsonFile: {fileID: 4900000, guid: 4dec25769ed4ed3469693b1c881248af, type: 3}
--- !u!1001 &1542437476
PrefabInstance:
m_ObjectHideFlags: 0
@ -20580,6 +20581,10 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 1039624185}
m_Modifications:
- target: {fileID: 2613237551265623801, guid: 452c94fdff2ec8b4b8e900c3582bd8d9, type: 3}
propertyPath: m_Name
value: connectbtn
objectReference: {fileID: 0}
- target: {fileID: 2613237551969927833, guid: 452c94fdff2ec8b4b8e900c3582bd8d9, type: 3}
propertyPath: m_Name
value: FreePanel01
@ -22654,8 +22659,12 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 1734941486877014248, guid: ca0e087ad731f8e4c87e761b0baa2d2c, type: 3}
propertyPath: m_SizeDelta.y
value: 116
value: 122
objectReference: {fileID: 0}
- target: {fileID: 1734941486877014249, guid: ca0e087ad731f8e4c87e761b0baa2d2c, type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: 8a7a0b7ab21d34f418036ae048036190, type: 3}
- target: {fileID: 1734941488510288321, guid: ca0e087ad731f8e4c87e761b0baa2d2c, type: 3}
propertyPath: m_AnchorMax.y
value: 1
@ -22678,7 +22687,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1734941488510288321, guid: ca0e087ad731f8e4c87e761b0baa2d2c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -58
value: -61
objectReference: {fileID: 0}
- target: {fileID: 2165836829436838819, guid: ca0e087ad731f8e4c87e761b0baa2d2c, type: 3}
propertyPath: m_Pivot.x

View File

@ -17,6 +17,7 @@ public class JSONReader : MonoBehaviour
public TextAsset NPCJosnFile;
public TextAsset LanguageJsonFile;
public TextAsset SelectJsonFile;
public TextAsset TaskJsonFile;
public Dictionary<int, NPCData> npcDictionary = new Dictionary<int, NPCData>();
public Dictionary<int, LocationData> locationDictionary = new Dictionary<int, LocationData>();
public Dictionary<int, EventData> eventDictionary = new Dictionary<int, EventData>();
@ -26,6 +27,7 @@ public class JSONReader : MonoBehaviour
public Dictionary<int, NPC> NPCDictionary = new Dictionary<int, NPC>();
public Dictionary<int, Language> LanguageDictionary = new Dictionary<int, Language>();
private Dictionary<string, Select> SelectDictionary = new Dictionary<string, Select>();
private Dictionary<string, Task_> TaskDictionary = new Dictionary<string, Task_>();
void Awake()
{
@ -39,6 +41,7 @@ public class JSONReader : MonoBehaviour
NPCDictionary = NPCParseJSON(incidentSiteJosnFile.text);
LanguageDictionary = LanguageParseJSON(LanguageJsonFile.text);
SelectDictionary = SelectJSON(SelectJsonFile.text);
TaskDictionary = TaskJSON(TaskJsonFile.text);
GetLanguageByID(20008);
@ -50,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)
{
@ -452,3 +469,28 @@ public class Select
// 其他字段可根据需要添加
}
[System.Serializable]
public class Task_
{
public string ID;
public string Note;
public string Name;
public string Type;
public string PlayScript;
public string Trigger;
public string TriggerLogic;
public string OverseeCond;
public string TimeLimit;
public string Role;
public string Selects;
public string TargetType;
public string Targets1;
public string Targets2;
public string Targets2Logic;
public string ExtraValue;
public string Sort;
public string IsShow;
public string Exclusive;
public string Reward;
}

View File

@ -5,12 +5,12 @@ using UnityEngine.UI;
public class TemplateInfo : MonoBehaviour
{
<<<<<<< HEAD:xiaofang/Assets/Script/hylScripts/Free01/NetPings.cs
//<<<<<<< HEAD:xiaofang/Assets/Script/hylScripts/Free01/NetPings.cs
=======
//=======
public Text templateText;
>>>>>>> e0ef89a8cfb64341378541f16f1e9f5cffbc01eb:xiaofang/Assets/Script/UI/TemplateInfo.cs
//>>>>>>> e0ef89a8cfb64341378541f16f1e9f5cffbc01eb:xiaofang/Assets/Script/UI/TemplateInfo.cs
// Start is called before the first frame update
void Start()
{