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(); }