From 89f66a8b916cb8f9979b81f2b775957b3ccd607d Mon Sep 17 00:00:00 2001 From: lq <3298408835@qq.com> Date: Thu, 2 Jan 2025 10:15:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?scene=E8=A1=A8json=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Resources/JsonAsset/Scene.json | 2 + xiaofang/Assets/Scenes/Schedule_03.unity | 151 +++++++++++++----- xiaofang/Assets/Script/Scheduled_03/Panel.cs | 96 +++-------- .../Script/UI/PanelUI/SelectScenePanel.cs | 16 +- 4 files changed, 150 insertions(+), 115 deletions(-) diff --git a/xiaofang/Assets/Resources/JsonAsset/Scene.json b/xiaofang/Assets/Resources/JsonAsset/Scene.json index 82c42d8b..dd14a66c 100644 --- a/xiaofang/Assets/Resources/JsonAsset/Scene.json +++ b/xiaofang/Assets/Resources/JsonAsset/Scene.json @@ -7,6 +7,7 @@ "ObjList": "7001,7002,7003|7001,7003|7001,7002,7003", "AreaList": "1012|1013|1014|1015|1017|1018|1019|1020|1021|1022|1023|1024|1025|1026|1027|1028|1029|1030|1076|1031|1032|1033|1034|1036|1037|1038|1039|1040|1041|1077|1078|1079|1080|1081|1082|1083|1084|1085|1086", "Storeroom": "1011", + "TriageArea": "1099", "ConfigText": "10039|10040|10039" }, { @@ -17,6 +18,7 @@ "ObjList": "7001,7002,7003|7001,7003|7001,7002,7003", "AreaList": "1012|1013|1014|1015|1017|1018|1019|1020|1021|1022|1023|1024|1025|1026|1027|1028|1029|1030|1076|1031|1032|1033|1034|1036|1037|1038|1039|1040|1041|1077|1078|1079|1080|1081|1082|1083|1084|1085|1086", "Storeroom": "1011", + "TriageArea": "1099", "ConfigText": "20034|20035|20036" } ] \ No newline at end of file diff --git a/xiaofang/Assets/Scenes/Schedule_03.unity b/xiaofang/Assets/Scenes/Schedule_03.unity index 979b7131..87e73c72 100644 --- a/xiaofang/Assets/Scenes/Schedule_03.unity +++ b/xiaofang/Assets/Scenes/Schedule_03.unity @@ -646,6 +646,82 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 6740850324693622956, guid: a15ee694d5f79864d816998fae77116d, type: 3} m_PrefabInstance: {fileID: 704068456} m_PrefabAsset: {fileID: 0} +--- !u!1 &323893669 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 323893670} + - component: {fileID: 323893672} + - component: {fileID: 323893671} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &323893670 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 323893669} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1120226610} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0.5936, y: 0.2968} + m_SizeDelta: {x: 85, y: 85} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &323893671 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 323893669} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 7eec63c0b14d7a24a9869a90b839245c, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &323893672 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 323893669} + m_CullTransparentMesh: 1 --- !u!1 &324885455 GameObject: m_ObjectHideFlags: 0 @@ -7005,14 +7081,15 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 323893670} m_Father: {fileID: 617308872} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 857.8053, y: 382.9524} - m_SizeDelta: {x: 104.3894, y: 116.0952} + m_AnchoredPosition: {x: 856.3214, y: 382.9524} + m_SizeDelta: {x: 115, y: 115} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1120226611 MonoBehaviour: @@ -7090,7 +7167,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 0e2355f01ff55d14aa4dc0fa4fdae0cb, type: 3} + m_Sprite: {fileID: 21300000, guid: b02008df96cdf83469777ece50f69030, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -7397,18 +7474,6 @@ MonoBehaviour: onValueChanged: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 7468736064579811972} - m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine - m_MethodName: SetActive - m_Mode: 0 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - m_Target: {fileID: 805990075} m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine m_MethodName: SetActive @@ -7433,6 +7498,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 + - m_Target: {fileID: 618256462} + m_TargetAssemblyTypeName: Panel, Assembly-CSharp + m_MethodName: SetTransfrom + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_IsOn: 0 --- !u!114 &1194981514 MonoBehaviour: @@ -13510,7 +13587,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 917, y: -343.34674} + m_AnchoredPosition: {x: 917, y: -816.70026} m_SizeDelta: {x: 1834, y: 473.3535} m_Pivot: {x: 0.5, y: 0.5} --- !u!224 &5475342653747154700 @@ -15853,9 +15930,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 334.1322, y: -55} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064122132329 @@ -16136,9 +16213,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 753.3966, y: -55} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064198941274 @@ -17380,9 +17457,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 543.7644, y: -55} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064659112359 @@ -17748,9 +17825,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 124.5, y: -55} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064820222392 @@ -18161,9 +18238,9 @@ RectTransform: m_Father: {fileID: 7468736064579811971} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 917, y: -1328.051} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 1834, y: 498.685} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064937661071 @@ -18181,7 +18258,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!222 &7468736065013593257 CanvasRenderer: m_ObjectHideFlags: 0 @@ -19417,9 +19494,9 @@ RectTransform: m_Father: {fileID: 7468736064579811971} 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: 917, y: -829.36597} m_SizeDelta: {x: 1834, y: 498.685} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736065836200803 @@ -19437,7 +19514,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &8920314133631286993 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/xiaofang/Assets/Script/Scheduled_03/Panel.cs b/xiaofang/Assets/Script/Scheduled_03/Panel.cs index b096f5fe..4280a7aa 100644 --- a/xiaofang/Assets/Script/Scheduled_03/Panel.cs +++ b/xiaofang/Assets/Script/Scheduled_03/Panel.cs @@ -121,27 +121,27 @@ public class Panel : Base //动态加载人员 public async void DynamicLoadingPeople() { - //for (int i = 0; i < 10; i++) - //{ - // GameObject item = GameObject.Instantiate(peoplePrefab, peopleCountent); - // PeopleItem peopleItem = item.GetComponent(); - // peopleItem.nameText.text = "角色1"; - // peopleItem.peopleId = "0"; - // Button peoplebutton = item.transform.Find("TextBtn").GetComponent