From 6ee036b478531230bcb637847d4301c9c9351ae9 Mon Sep 17 00:00:00 2001 From: lq <3298408835@qq.com> Date: Mon, 9 Dec 2024 14:12:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BC=A0=E8=BE=93=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=20=E6=95=B0=E6=8D=AE=E4=BC=A0=E8=BE=93=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Script/Scheduled_03/Panel.cs | 4 +++- xiaofang/Assets/Script/UI/PanelUI/SelectScenePanel.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xiaofang/Assets/Script/Scheduled_03/Panel.cs b/xiaofang/Assets/Script/Scheduled_03/Panel.cs index 9ce2c113..84730b00 100644 --- a/xiaofang/Assets/Script/Scheduled_03/Panel.cs +++ b/xiaofang/Assets/Script/Scheduled_03/Panel.cs @@ -96,7 +96,7 @@ public class Panel : MonoBehaviour for (int i = 1; i < panelToggle.Length; i++) { panelToggle[i].interactable = false; - //panelToggle[i].gameObject. + panelToggle[i].gameObject.transform.GetComponent().sprite = toggleImage[0]; } } @@ -367,7 +367,9 @@ public class Panel : MonoBehaviour if(selectScenePanel.isSure) { panelToggle[1].interactable = selectScenePanel.isSure; // 启用第二个Toggle + panelToggle[1].gameObject.transform.GetComponent().sprite = toggleImage[1]; panelToggle[2].interactable = selectScenePanel.isSure; // 启用第三个Toggle + panelToggle[2].gameObject.transform.GetComponent().sprite = toggleImage[1]; panelToggle[3].interactable = selectScenePanel.isSure; // 启用第二个Toggle panelToggle[4].interactable = selectScenePanel.isSure; // 启用第三个Toggle } diff --git a/xiaofang/Assets/Script/UI/PanelUI/SelectScenePanel.cs b/xiaofang/Assets/Script/UI/PanelUI/SelectScenePanel.cs index 801dfb2c..53b5921d 100644 --- a/xiaofang/Assets/Script/UI/PanelUI/SelectScenePanel.cs +++ b/xiaofang/Assets/Script/UI/PanelUI/SelectScenePanel.cs @@ -182,6 +182,7 @@ public class SelectScenePanel : MonoBehaviour if (isSelected) { this.idcidentName = item.incidentText.text; + this.idcidentId = item.incidentID; string[] difficulty = eventData.Value.Difficulty.Split('|'); // 确保difficultyList和difficulty的长度匹配 @@ -264,7 +265,6 @@ public class SelectScenePanel : MonoBehaviour EventData eventData = jsonReader.GetEvenById(this.eventId); foreach (string disasterLocation in incidentIds2) { - //Debug.Log("disasterLocation>>>>>>>"+ disasterLocation); InstantiateIncidentPrefab(int.Parse(disasterLocation)); OnRandomEventClick(); }