diff --git a/meng_yao/Assets/Scenes/New/Scene_map_1.unity b/meng_yao/Assets/Scenes/New/Scene_map_1.unity index 0bc7f41f..4cac5ab7 100644 --- a/meng_yao/Assets/Scenes/New/Scene_map_1.unity +++ b/meng_yao/Assets/Scenes/New/Scene_map_1.unity @@ -4372,7 +4372,6 @@ GameObject: - component: {fileID: 1337722729} - component: {fileID: 1337722730} - component: {fileID: 1337722731} - - component: {fileID: 1337722732} m_Layer: 0 m_Name: ReadJson m_TagString: Untagged @@ -4428,20 +4427,6 @@ MonoBehaviour: description: MapLevelJson: {fileID: 4900000, guid: b534002cbb7fddf4bb68f34fb1357ff3, type: 3} count: 0 ---- !u!114 &1337722732 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1337722728} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 39d4d2c40e6ce1e45bb8069dc25b05e8, type: 3} - m_Name: - m_EditorClassIdentifier: - description: - _Json: {fileID: 0} --- !u!1 &1342038372 GameObject: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/script/A_Fight/json/Mengyao_Skill_Date.cs b/meng_yao/Assets/script/A_Fight/json/Mengyao_Skill_Date.cs index 0590d9ce..2a983ce5 100644 --- a/meng_yao/Assets/script/A_Fight/json/Mengyao_Skill_Date.cs +++ b/meng_yao/Assets/script/A_Fight/json/Mengyao_Skill_Date.cs @@ -6,13 +6,19 @@ using UnityEngine; public class Mengyao_Skill_Date : JsonReadBase { - public string _Json = "{\r\n \"M_H_001\": {\r\n \"M_H_001_S_1\": {\r\n \"1\": {\r\n \"Range\":2\r\n },\r\n \"2\": {\r\n \"DamageBuff\": 0.15\r\n },\r\n \"3\": {\r\n \"SkillList\": [\"skill_0\"],\r\n \"Range\": -1\r\n },\r\n \"4\": {\r\n \"DamageBuff\": 0.35\r\n },\r\n \"5\": {\r\n \"AttackCooldown\": -0.5,\r\n \"AttackContinues\":-0.5\r\n }\r\n },\r\n \"M_H_001_S_2\": {\r\n \"1\": {\r\n \"SkillList\": [\r\n \"skill_1\"\r\n ],\r\n \"DamageBuff\": -0.5\r\n },\r\n \"2\": {\r\n \"DamageBuff\": 0.15\r\n },\r\n \"3\": {\r\n \"SkillList\": [\r\n \"skill_2\"\r\n ],\r\n \"AttackCooldown\": 0.05\r\n },\r\n \"4\": {\r\n \"DamageBuff\": 0.35\r\n },\r\n \"5\": {\r\n \"AttackCooldown\": 0.3,\r\n \"AttackContinues\": 0.5\r\n }\r\n }\r\n }\r\n}"; + public TextAsset _Json; public Dictionary>> parsedData; void Awake() { - print(_Json); + // 解析 JSON 数据 - parsedData = JsonConvert.DeserializeObject>>>(_Json); + //parsedData = JsonConvert.DeserializeObject>>>(_Json.text.Trim()); + } + + void Start() + { + // 解析 JSON 数据 + parsedData = JsonConvert.DeserializeObject>>>(_Json.text.Trim()); } }