提交提交!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This commit is contained in:
林小智丶 2024-12-24 21:15:03 +08:00
parent 2a03c69761
commit dfd654db8d
9 changed files with 3981 additions and 812 deletions

View File

@ -524,7 +524,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3762380756227831939, guid: f012cdb5db178594a8c5a7afe1a573fb, type: 3}
propertyPath: m_SizeDelta.x
value: -23.3146
value: 0.000061035
objectReference: {fileID: 0}
- target: {fileID: 3762380756227831939, guid: f012cdb5db178594a8c5a7afe1a573fb, type: 3}
propertyPath: m_SizeDelta.y
@ -674,6 +674,10 @@ PrefabInstance:
propertyPath: m_ShowMaskGraphic
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7841732193609649466, guid: f012cdb5db178594a8c5a7afe1a573fb, type: 3}
propertyPath: m_SizeDelta.x
value: 215.038
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f012cdb5db178594a8c5a7afe1a573fb, type: 3}
--- !u!224 &405829316583602131 stripped

View File

@ -1,5 +1,309 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &211310467
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 211310468}
- component: {fileID: 211310470}
- component: {fileID: 211310469}
m_Layer: 5
m_Name: Imageeee
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &211310468
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 211310467}
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: 750830055125599039}
m_RootOrder: 6
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: -206, y: 252}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &211310470
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 211310467}
m_CullTransparentMesh: 1
--- !u!114 &211310469
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 211310467}
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: 0}
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!1 &379399411
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 379399412}
- component: {fileID: 379399414}
- component: {fileID: 379399413}
m_Layer: 5
m_Name: Imageeee (8)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &379399412
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 379399411}
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: 750830055125599039}
m_RootOrder: 14
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: 460, y: -103}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &379399414
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 379399411}
m_CullTransparentMesh: 1
--- !u!114 &379399413
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 379399411}
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: 0}
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!1 &406527831
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 406527832}
- component: {fileID: 406527834}
- component: {fileID: 406527833}
m_Layer: 5
m_Name: Imageeee (7)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &406527832
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 406527831}
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: 750830055125599039}
m_RootOrder: 13
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: 460, y: 43}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &406527834
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 406527831}
m_CullTransparentMesh: 1
--- !u!114 &406527833
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 406527831}
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: 0}
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!1 &416074960
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 416074961}
- component: {fileID: 416074963}
- component: {fileID: 416074962}
m_Layer: 5
m_Name: Imageeee (6)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &416074961
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 416074960}
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: 750830055125599039}
m_RootOrder: 12
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: 460, y: 252}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &416074963
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 416074960}
m_CullTransparentMesh: 1
--- !u!114 &416074962
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 416074960}
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: 0}
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!1 &482349648
GameObject:
m_ObjectHideFlags: 0
@ -80,6 +384,82 @@ MonoBehaviour:
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u786E\u5B9A"
--- !u!1 &493941014
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 493941015}
- component: {fileID: 493941017}
- component: {fileID: 493941016}
m_Layer: 5
m_Name: Imageeee (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &493941015
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 493941014}
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: 750830055125599039}
m_RootOrder: 8
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: -206, y: -103}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &493941017
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 493941014}
m_CullTransparentMesh: 1
--- !u!114 &493941016
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 493941014}
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: 0}
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!1 &909775201
GameObject:
m_ObjectHideFlags: 0
@ -163,6 +543,82 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &911477711
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 911477712}
- component: {fileID: 911477714}
- component: {fileID: 911477713}
m_Layer: 5
m_Name: Imageeee (4)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &911477712
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 911477711}
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: 750830055125599039}
m_RootOrder: 10
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: 72, y: 43}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &911477714
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 911477711}
m_CullTransparentMesh: 1
--- !u!114 &911477713
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 911477711}
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: 0}
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!1 &990204177
GameObject:
m_ObjectHideFlags: 0
@ -285,6 +741,82 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1238453426
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1238453427}
- component: {fileID: 1238453429}
- component: {fileID: 1238453428}
m_Layer: 5
m_Name: Imageeee (5)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1238453427
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1238453426}
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: 750830055125599039}
m_RootOrder: 11
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: 72, y: -103}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1238453429
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1238453426}
m_CullTransparentMesh: 1
--- !u!114 &1238453428
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1238453426}
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: 0}
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!1 &1473629152
GameObject:
m_ObjectHideFlags: 0
@ -453,6 +985,82 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1834165867}
m_CullTransparentMesh: 1
--- !u!1 &1993698293
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1993698294}
- component: {fileID: 1993698296}
- component: {fileID: 1993698295}
m_Layer: 5
m_Name: Imageeee (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1993698294
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1993698293}
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: 750830055125599039}
m_RootOrder: 9
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: 72, y: 252}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1993698296
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1993698293}
m_CullTransparentMesh: 1
--- !u!114 &1993698295
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1993698293}
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: 0}
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!1 &2021100440
GameObject:
m_ObjectHideFlags: 0
@ -533,6 +1141,82 @@ MonoBehaviour:
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Button
--- !u!1 &2060991045
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2060991046}
- component: {fileID: 2060991048}
- component: {fileID: 2060991047}
m_Layer: 5
m_Name: Imageeee (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &2060991046
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2060991045}
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: 750830055125599039}
m_RootOrder: 7
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: -206, y: 43}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2060991048
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2060991045}
m_CullTransparentMesh: 1
--- !u!114 &2060991047
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2060991045}
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: 0}
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!1 &1357012343302343943
GameObject:
m_ObjectHideFlags: 0
@ -716,6 +1400,7 @@ RectTransform:
- {fileID: 1058687967604199524}
- {fileID: 2573574797694731610}
- {fileID: 3077635298785468484}
- {fileID: 3077635299240567869}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -805,6 +1490,15 @@ MonoBehaviour:
OpcList: []
EvacuateSurePanel: {fileID: 990204177}
EvacuatePanel: {fileID: 1834165867}
minPanel1: {fileID: 211310467}
minPanel2: {fileID: 2060991045}
minPanel3: {fileID: 493941014}
minPanel4: {fileID: 1993698293}
minPanel5: {fileID: 911477711}
minPanel6: {fileID: 1238453426}
minPanel7: {fileID: 416074960}
minPanel8: {fileID: 406527831}
minPanel9: {fileID: 379399411}
TipBg: {fileID: 3649662722171167502}
AccidentImage: {fileID: 2858733836781539400}
AccidentButton: {fileID: 2858733836895849017}
@ -828,8 +1522,9 @@ MonoBehaviour:
Order: []
content1: {fileID: 4655442274320728346}
OpcName: []
InfoBg: {fileID: 0}
InfoBg: {fileID: 21300000, guid: 07ec55c139b9ebb44b5e41e6737f4312, type: 3}
itemPrefab: {fileID: 3095696782386080805, guid: 880eb45c9766fa64fae96c6ef0e373ff, type: 3}
Order2Prefab: {fileID: 3077635299240567868}
JSONReader: {fileID: 3077635298785468485}
OpcItems: []
DirectChildren: []
@ -1688,7 +2383,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3095696782386080802, guid: 880eb45c9766fa64fae96c6ef0e373ff, type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 126
objectReference: {fileID: 0}
- target: {fileID: 3095696782386080802, guid: 880eb45c9766fa64fae96c6ef0e373ff, type: 3}
propertyPath: m_LocalPosition.x
@ -1760,7 +2455,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3095696782567605136, guid: 880eb45c9766fa64fae96c6ef0e373ff, type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 101.65835
objectReference: {fileID: 0}
- target: {fileID: 3095696782567605136, guid: 880eb45c9766fa64fae96c6ef0e373ff, type: 3}
propertyPath: m_AnchoredPosition.x
@ -1772,6 +2467,113 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 880eb45c9766fa64fae96c6ef0e373ff, type: 3}
--- !u!1001 &3032695104823349456
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 3077635299444999927}
m_Modifications:
- target: {fileID: 46083688657597676, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_Name
value: OpcOrder2
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_RootOrder
value: 10
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_SizeDelta.x
value: 361.1352
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_SizeDelta.y
value: 112.5303
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_AnchoredPosition.x
value: -2.1685
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_AnchoredPosition.y
value: 124.91885
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
--- !u!1 &3077635299240567868 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 46083688657597676, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
m_PrefabInstance: {fileID: 3032695104823349456}
m_PrefabAsset: {fileID: 0}
--- !u!224 &3077635299240567869 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3}
m_PrefabInstance: {fileID: 3032695104823349456}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3077635298643823765
PrefabInstance:
m_ObjectHideFlags: 0
@ -3963,6 +4765,18 @@ PrefabInstance:
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368487729488031803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_SizeDelta.x
value: 3745.374
objectReference: {fileID: 0}
- target: {fileID: 2368487729488031803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_SizeDelta.y
value: 517.034
objectReference: {fileID: 0}
- target: {fileID: 2368487729488031803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchoredPosition.x
value: 984.3421
objectReference: {fileID: 0}
- target: {fileID: 2368487729488031803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchoredPosition.y
value: 54
@ -3997,23 +4811,23 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 354
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 177
objectReference: {fileID: 0}
- target: {fileID: 2368487729759097803, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -32.2326
objectReference: {fileID: 0}
- target: {fileID: 2368487729838770152, guid: f7325740e682bf04a909abba74479379, type: 3}
propertyPath: m_SizeDelta.y
@ -4282,16 +5096,16 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Left: -35
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_ChildAlignment: 0
m_StartCorner: 0
m_StartAxis: 0
m_CellSize: {x: 356.4, y: 519.5}
m_Spacing: {x: 0, y: 0}
m_Constraint: 1
m_Spacing: {x: 21.14, y: 0}
m_Constraint: 0
m_ConstraintCount: 5
--- !u!224 &750830055714013965 stripped
RectTransform:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b94195b82c852fe4f814d48797720281
guid: 09ab129ab15635d4482ae5617eb97556
PrefabImporter:
externalObjects: {}
userData:

View File

@ -148,7 +148,7 @@ MonoBehaviour:
m_ChildAlignment: 0
m_StartCorner: 0
m_StartAxis: 1
m_CellSize: {x: 340, y: 179.3}
m_CellSize: {x: 325, y: 179.3}
m_Spacing: {x: 0, y: -58.29}
m_Constraint: 1
m_ConstraintCount: 1

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 9b79a3b3b277c8942ba937f017cf67dd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@ using JetBrains.Annotations;
using Newtonsoft.Json;
using TMPro;
using Unity.VisualScripting;
using UnityEditor.Rendering.LookDev;
using UnityEngine;
using UnityEngine.UI;
@ -96,12 +97,16 @@ public class FreePanelManager : MonoBehaviour
public Text OpcText;//预制体文本内容
#endregion
private static int a = 0;
private static int bb = 5;
public static FreePanelManager Z;
public void Start()
{
Z = this;
ContainsValue(11002);
if (DirectChildren.Count>=5)
{
OpcRight.gameObject.SetActive(true);
}
#region 西
InitializeChild();
#endregion
@ -163,6 +168,14 @@ public class FreePanelManager : MonoBehaviour
StopCoroutine(FadeInOutRoutine());
isFadeEnd = false;
}
}
public void FixedUpdate()
{
if (bb == DirectChildren.Count)
{
OpcRight.gameObject.SetActive(false);
}
}
/// <summary>
/// 打开特殊情况弹窗
@ -437,11 +450,28 @@ public class FreePanelManager : MonoBehaviour
{
DirectChildren[a].gameObject.SetActive(false);
a += 1;
bb += 1;
}
if (b < 0)
{
DirectChildren[a].gameObject.SetActive(true);
a -= 1;
bb-=1;
}
//Åжϰ´Å¥ÊÇ·ñÏÔʾ
if (DirectChildren[0].gameObject.activeSelf)
{
OpcRight.gameObject.SetActive(true);
}
if (DirectChildren[0].gameObject.activeSelf)
{
OpcLeft.gameObject.SetActive(false);
}
else
{
OpcLeft.gameObject.SetActive(true);
}
}

View File

@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@ -5,125 +6,250 @@ using UnityEngine.UI;
public class OpcOrder2 : MonoBehaviour
{
public Dropdown dropdown; // Dropdown 组件
private string originalText; // 存储原始显示的文字
public static OpcOrder2 opcOrder2;
public string defaultOption = "不想上班!"; // 默认选项
private bool isDropdownInitialized = false;
#region
//public Dropdown dropdown; // Dropdown 组件
//private string originalText; // 存储原始显示的文字
//public static OpcOrder2 opcOrder2;
//public string defaultOption = "不想上班!"; // 默认选项
//private bool isDropdownInitialized = false;
//private void Start()
//{
// // 初始化 Dropdown
// if (dropdown == null)
// {
// dropdown = GetComponent<Dropdown>();
// }
// // 清空默认选项
// dropdown.options.Clear();
// // 添加默认显示的选项
// dropdown.options.Add(new Dropdown.OptionData(defaultOption)); // 默认选项A
// dropdown.captionText.text = defaultOption; // 设置默认显示文字
// // 初始化下拉选项(不包括 A
// dropdown.options.Add(new Dropdown.OptionData("选项 B"));
// dropdown.options.Add(new Dropdown.OptionData("选项 C"));
// dropdown.options.Add(new Dropdown.OptionData("选项 D"));
// // 添加值变化事件
// dropdown.onValueChanged.AddListener(OnDropdownValueChanged);
// // 初始化绑定选项的点击事件
// BindToggleEvents();
//}
//// 设置默认选项文本,外部可以调用这个方法改变默认文本
//public string SetText(string str)
//{
// defaultOption = str;
// dropdown.captionText.text = defaultOption; // 设置默认选项的显示文本
// return str;
//}
//// 当下拉框的值改变时触发
//private void OnDropdownValueChanged(int index)
//{
// if (isDropdownInitialized)
// {
// // 更新下拉框显示的文字为选中的选项
// // 但是不改变默认选项的值
// dropdown.captionText.text = dropdown.options[index].text;
// // 执行自定义逻辑
// Debug.Log($"点击了选项:{dropdown.options[index].text}");
// }
// isDropdownInitialized = true;
//}
//// 动态绑定选项的 Toggle 点击事件
//private void BindToggleEvents()
//{
// // 获取 Dropdown 的 Template下拉项模板
// Transform dropdownTemplate = dropdown.transform.Find("Template");
// if (dropdownTemplate != null)
// {
// Transform viewport = dropdownTemplate.Find("Viewport");
// if (viewport != null)
// {
// Transform content = viewport.Find("Content");
// if (content != null)
// {
// // 遍历 Content 下的所有子物体(即下拉列表中的选项)
// foreach (Transform option in content)
// {
// Toggle toggle = option.GetComponent<Toggle>();
// if (toggle != null)
// {
// string optionText = option.GetComponentInChildren<Text>().text;
// // 为每个选项绑定点击事件
// toggle.onValueChanged.AddListener((isOn) =>
// {
// if (isOn)
// {
// HandleOptionClick(optionText);
// toggle.isOn = false; // 重置 Toggle 状态,防止选项保持选中
// }
// });
// }
// }
// }
// }
// }
// else
// {
// Debug.LogWarning("未找到 Dropdown 的 Template 部分,无法绑定点击事件!");
// }
//}
//// 处理选项点击逻辑
//private void HandleOptionClick(string optionText)
//{
// Debug.Log($"点击了选项:{optionText}");
// // 根据点击的选项执行不同的逻辑
// switch (optionText)
// {
// case "选项 B":
// Debug.Log("执行选项 B 的逻辑!");
// break;
// case "选项 C":
// Debug.Log("执行选项 C 的逻辑!");
// break;
// case "选项 D":
// Debug.Log("执行选项 D 的逻辑!");
// break;
// default:
// Debug.LogWarning($"未处理的选项:{optionText}");
// break;
// }
//}
#endregion
public GameObject Tip;
public Button btn;
public GameObject itemPrefab; // 用于生成的Item预制体
public Transform contentTransform; // Content的Transform
public JSONReader jsonReader;
List<List<string>> groupedData;
public List<GameObject> ItemList;
private void Start()
{
// 初始化 Dropdown
if (dropdown == null)
btn.onClick.AddListener(() =>
{
dropdown = GetComponent<Dropdown>();
}
// 清空默认选项
dropdown.options.Clear();
// 添加默认显示的选项
dropdown.options.Add(new Dropdown.OptionData(defaultOption)); // 默认选项A
dropdown.captionText.text = defaultOption; // 设置默认显示文字
// 初始化下拉选项(不包括 A
dropdown.options.Add(new Dropdown.OptionData("选项 B"));
dropdown.options.Add(new Dropdown.OptionData("选项 C"));
dropdown.options.Add(new Dropdown.OptionData("选项 D"));
// 添加值变化事件
dropdown.onValueChanged.AddListener(OnDropdownValueChanged);
// 初始化绑定选项的点击事件
BindToggleEvents();
}
// 设置默认选项文本,外部可以调用这个方法改变默认文本
public string SetText(string str)
{
defaultOption = str;
dropdown.captionText.text = defaultOption; // 设置默认选项的显示文本
return str;
}
// 当下拉框的值改变时触发
private void OnDropdownValueChanged(int index)
{
if (isDropdownInitialized)
{
// 更新下拉框显示的文字为选中的选项
// 但是不改变默认选项的值
dropdown.captionText.text = dropdown.options[index].text;
// 执行自定义逻辑
Debug.Log($"点击了选项:{dropdown.options[index].text}");
}
isDropdownInitialized = true;
}
// 动态绑定选项的 Toggle 点击事件
private void BindToggleEvents()
{
// 获取 Dropdown 的 Template下拉项模板
Transform dropdownTemplate = dropdown.transform.Find("Template");
if (dropdownTemplate != null)
{
Transform viewport = dropdownTemplate.Find("Viewport");
if (viewport != null)
bool isActive = Tip.activeSelf;
Tip.SetActive(!isActive);
if (ItemList.Count == 1)
{
Transform content = viewport.Find("Content");
if (content != null)
{
// 遍历 Content 下的所有子物体(即下拉列表中的选项)
foreach (Transform option in content)
{
Toggle toggle = option.GetComponent<Toggle>();
if (toggle != null)
{
string optionText = option.GetComponentInChildren<Text>().text;
// 为每个选项绑定点击事件
toggle.onValueChanged.AddListener((isOn) =>
{
if (isOn)
{
HandleOptionClick(optionText);
toggle.isOn = false; // 重置 Toggle 状态,防止选项保持选中
}
});
}
}
}
Debug.Log("进来了");
CreateItem(2001, 1);
}
});
}
public void CreateItem(int ID, int k)
{
if (k >= 3)
{
if (k == 4) k = 1;
if (k == 5) k = 2;
if (k == 6) k = 3;
}
// 查找数据
foreach (var kvp in jsonReader.incidentSiteDictionary)
{
IncidentSite select = kvp.Value;
if (select.Name == ID)
{
groupedData = ParseData(select.Role);
}
}
// 动态生成Item并添加到Content
for (int i = 0; i < groupedData[k].Count - 1; i++)
{
// 生成Item并设置为Content的子物体
GameObject newItem = Instantiate(itemPrefab, contentTransform);
ItemList.Add(newItem);
// 为每个Item添加按钮点击事件
Button button = newItem.GetComponent<Button>();
if (button != null)
{
// 捕获当前的Item对象避免闭包问题
GameObject currentItem = newItem;
// 根据具体需求绑定独立的隐藏逻辑
button.onClick.AddListener(() => OnItemClick(currentItem, i)); // 传入索引和对象
}
else
{
Debug.LogError("生成的Item中没有找到Button组件");
}
}
// 设置文本
SetItemText(k);
}
// 点击事件处理函数,支持单独管理
private void OnItemClick(GameObject item, int index)
{
// 示例:判断是否需要隐藏
if (ShouldHideItem(index))
{
}
else
{
Debug.LogWarning("未找到 Dropdown 的 Template 部分,无法绑定点击事件!");
item.SetActive(false); // 仅隐藏需要隐藏的Item
Tip.SetActive(false);
}
}
// 处理选项点击逻辑
private void HandleOptionClick(string optionText)
// 判断是否需要隐藏当前Item
private bool ShouldHideItem(int index)
{
Debug.Log($"点击了选项:{optionText}");
// 根据点击的选项执行不同的逻辑
switch (optionText)
// 示例逻辑:根据索引决定是否隐藏
// 比如隐藏索引为偶数的Item
return index==2;
}
//设置文本
public void SetItemText(int k)
{
for (int i = 0; i < ItemList.Count; i++)
{
case "选项 B":
Debug.Log("执行选项 B 的逻辑!");
break;
case "选项 C":
Debug.Log("执行选项 C 的逻辑!");
break;
case "选项 D":
Debug.Log("执行选项 D 的逻辑!");
break;
default:
Debug.LogWarning($"未处理的选项:{optionText}");
break;
Text itemText = ItemList[i].GetComponentInChildren<Text>();
if (itemText != null)
{
itemText.text = jsonReader.GetOcpName(int.Parse(groupedData[k][i]));
}
else
{
Debug.LogError("生成的Item中没有找到Text组件");
}
}
}
public static List<List<string>> ParseData(string data)
{
// 存储最终结果
List<List<string>> result = new List<List<string>>();
// 按 `|` 分割字符串
string[] groups = data.Split('|');
foreach (var group in groups)
{
// 按 `,` 分割每组数据
string[] items = group.Split(',');
// 添加到结果中
result.Add(new List<string>(items));
}
return result;
}
}