From 158082ec635e8e614cf3913340dc18975521df3a Mon Sep 17 00:00:00 2001 From: lq <3298408835@qq.com> Date: Wed, 11 Dec 2024 01:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=96=8F=E6=95=A3=E4=BA=BA=E7=BE=A4=E5=85=AC?= =?UTF-8?q?=E5=B8=83=E5=BC=B9=E7=AA=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Scenes/Schedule_03.unity | 54 +++++++++++-------- xiaofang/Assets/Script/Scheduled_03/Panel.cs | 6 ++- .../Script/UI/PanelUI/EvacuationPanel.cs | 5 +- xiaofang/Assets/yhj/scripts/JueseChoicePop.cs | 44 ++++++++++----- 4 files changed, 66 insertions(+), 43 deletions(-) diff --git a/xiaofang/Assets/Scenes/Schedule_03.unity b/xiaofang/Assets/Scenes/Schedule_03.unity index e151f897..732abe70 100644 --- a/xiaofang/Assets/Scenes/Schedule_03.unity +++ b/xiaofang/Assets/Scenes/Schedule_03.unity @@ -2138,7 +2138,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &618256459 RectTransform: m_ObjectHideFlags: 0 @@ -2211,7 +2211,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 618256458} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 05b11d619e5d88a439384d80484d6952, type: 3} m_Name: @@ -3413,7 +3413,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &805990076 RectTransform: m_ObjectHideFlags: 0 @@ -10337,6 +10337,14 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 9196293257107006895, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3} + propertyPath: panel + value: + objectReference: {fileID: 618256462} + - target: {fileID: 9196293257107006895, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3} + propertyPath: jsonReader + value: + objectReference: {fileID: 1417128757} - target: {fileID: 9196293257811847185, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3} propertyPath: m_SizeDelta.x value: -22.699951 @@ -14666,9 +14674,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 334.1322, y: -55} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064122132329 @@ -14949,9 +14957,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 753.3966, y: -55} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064198941274 @@ -15709,7 +15717,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 3.3229} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 1834, y: 1070} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064579811972 GameObject: @@ -15731,7 +15739,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &7468736064579811982 MonoBehaviour: m_ObjectHideFlags: 0 @@ -16189,9 +16197,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 543.7644, y: -55} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064659112359 @@ -16395,9 +16403,9 @@ RectTransform: m_Father: {fileID: 7468736064579811971} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 917, y: -53.335} m_SizeDelta: {x: 1834, y: 106.67} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064728012045 @@ -16557,9 +16565,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 124.5, y: -55} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064820222392 @@ -16970,9 +16978,9 @@ RectTransform: m_Father: {fileID: 7468736064579811971} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 917, y: -588.33496} m_SizeDelta: {x: 1834, y: 498.685} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064937661071 diff --git a/xiaofang/Assets/Script/Scheduled_03/Panel.cs b/xiaofang/Assets/Script/Scheduled_03/Panel.cs index dc62de52..ad2f56a5 100644 --- a/xiaofang/Assets/Script/Scheduled_03/Panel.cs +++ b/xiaofang/Assets/Script/Scheduled_03/Panel.cs @@ -350,6 +350,7 @@ public class Panel : MonoBehaviour // 如果没有达到上限,则可以添加人员信息 if (!isLimitReached) { + Debug.Log(">>>>>>>>>>>>>>>>>>>"+ selectedInfo.dutyId); // 通过创建一个新的 SelectedInfo 实例来避免引用同一个对象 SelectedInfo newSelectedInfo = new SelectedInfo { @@ -359,7 +360,7 @@ public class Panel : MonoBehaviour dutyId = selectedInfo.dutyId, sceneId = selectedInfo.sceneId }; - + // 将当前选中的人员信息添加到对应场景的人员列表中 currentSceneInfo.Add(newSelectedInfo); @@ -436,8 +437,8 @@ public class Panel : MonoBehaviour } else if (buttonText != null && buttonText.tag == Tags.duty) // 获取标签为职责的信息 { - DutyItem item = clickedButton.GetComponentInParent(); duty = buttonText.text; + DutyItem item = clickedButton.GetComponentInParent(); if(duty=="主持人") { isDutySelected = true; // 选择了职责 @@ -450,6 +451,7 @@ public class Panel : MonoBehaviour } dutyId = item.dutyId; selectedInfo.duty = duty; + selectedInfo.dutyId = dutyId; } } } diff --git a/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs b/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs index 83d737da..cdc89bfc 100644 --- a/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs +++ b/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs @@ -333,9 +333,9 @@ public class EvacuationPanel : MonoBehaviour Button levelBtn = levelItem.transform.Find("chooseBtn2").GetComponent