修复Mask逻辑
This commit is contained in:
parent
5cac035cf7
commit
d16751d036
|
@ -9,8 +9,6 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1739812074570663577}
|
- component: {fileID: 1739812074570663577}
|
||||||
- component: {fileID: 1739812074570663575}
|
|
||||||
- component: {fileID: 1739812074570663576}
|
|
||||||
- component: {fileID: 1739812074570663574}
|
- component: {fileID: 1739812074570663574}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: UI_MaskPanel
|
m_Name: UI_MaskPanel
|
||||||
|
@ -30,7 +28,8 @@ RectTransform:
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 8284933056051780802}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
@ -39,44 +38,6 @@ RectTransform:
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1739812074570663575
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1739812074570663578}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &1739812074570663576
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1739812074570663578}
|
|
||||||
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: 0, g: 0, b: 0, a: 0}
|
|
||||||
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: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
|
||||||
m_Type: 1
|
|
||||||
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!114 &1739812074570663574
|
--- !u!114 &1739812074570663574
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -89,3 +50,80 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 2b63019446a8ba3428d1055df6fb4366, type: 3}
|
m_Script: {fileID: 11500000, guid: 2b63019446a8ba3428d1055df6fb4366, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
fadeInSpeed: 0.5
|
||||||
|
--- !u!1 &2272385754182984871
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8284933056051780802}
|
||||||
|
- component: {fileID: 5121238732433573415}
|
||||||
|
- component: {fileID: 6709792472113697369}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Mask
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &8284933056051780802
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2272385754182984871}
|
||||||
|
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: 1739812074570663577}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &5121238732433573415
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2272385754182984871}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &6709792472113697369
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2272385754182984871}
|
||||||
|
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: 0, g: 0, b: 0, 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
|
||||||
|
|
|
@ -238,112 +238,6 @@ MonoBehaviour:
|
||||||
m_ShadowLayerMask: 1
|
m_ShadowLayerMask: 1
|
||||||
m_LightCookieSize: {x: 1, y: 1}
|
m_LightCookieSize: {x: 1, y: 1}
|
||||||
m_LightCookieOffset: {x: 0, y: 0}
|
m_LightCookieOffset: {x: 0, y: 0}
|
||||||
--- !u!224 &930849161 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1051681425}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1001 &1051681425
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
m_TransformParent: {fileID: 1507034761}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 1739812074570663576, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_Color.a
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_Pivot.x
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_Pivot.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_RootOrder
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663577, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1739812074570663578, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: UI_MaskPanel
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 0631a5a524453a64894fdbf946760a64, type: 3}
|
|
||||||
--- !u!1 &1412047389
|
--- !u!1 &1412047389
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -355,6 +249,8 @@ GameObject:
|
||||||
- component: {fileID: 1412047392}
|
- component: {fileID: 1412047392}
|
||||||
- component: {fileID: 1412047391}
|
- component: {fileID: 1412047391}
|
||||||
- component: {fileID: 1412047390}
|
- component: {fileID: 1412047390}
|
||||||
|
- component: {fileID: 1412047394}
|
||||||
|
- component: {fileID: 1412047393}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Main Camera
|
m_Name: Main Camera
|
||||||
m_TagString: MainCamera
|
m_TagString: MainCamera
|
||||||
|
@ -380,7 +276,7 @@ Camera:
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_ClearFlags: 1
|
m_ClearFlags: 1
|
||||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
m_projectionMatrixMode: 1
|
m_projectionMatrixMode: 1
|
||||||
m_GateFitMode: 2
|
m_GateFitMode: 2
|
||||||
m_FOVAxisMode: 0
|
m_FOVAxisMode: 0
|
||||||
|
@ -428,173 +324,48 @@ Transform:
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1507034757
|
--- !u!114 &1412047393
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1507034761}
|
|
||||||
- component: {fileID: 1507034760}
|
|
||||||
- component: {fileID: 1507034759}
|
|
||||||
- component: {fileID: 1507034758}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Canvas
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &1507034758
|
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1507034757}
|
m_GameObject: {fileID: 1412047389}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
m_Script: {fileID: 11500000, guid: 83c0f087d2600824b823b4975105d63e, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_IgnoreReversedGraphics: 1
|
--- !u!114 &1412047394
|
||||||
m_BlockingObjects: 0
|
MonoBehaviour:
|
||||||
m_BlockingMask:
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1412047389}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_RenderShadows: 1
|
||||||
|
m_RequiresDepthTextureOption: 2
|
||||||
|
m_RequiresOpaqueTextureOption: 2
|
||||||
|
m_CameraType: 0
|
||||||
|
m_Cameras: []
|
||||||
|
m_RendererIndex: -1
|
||||||
|
m_VolumeLayerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967295
|
m_Bits: 1
|
||||||
--- !u!114 &1507034759
|
m_VolumeTrigger: {fileID: 0}
|
||||||
MonoBehaviour:
|
m_VolumeFrameworkUpdateModeOption: 2
|
||||||
m_ObjectHideFlags: 0
|
m_RenderPostProcessing: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_Antialiasing: 0
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_AntialiasingQuality: 2
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_StopNaN: 0
|
||||||
m_GameObject: {fileID: 1507034757}
|
m_Dithering: 0
|
||||||
m_Enabled: 1
|
m_ClearDepth: 1
|
||||||
m_EditorHideFlags: 0
|
m_AllowXRRendering: 1
|
||||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
m_RequiresDepthTexture: 0
|
||||||
m_Name:
|
m_RequiresColorTexture: 0
|
||||||
m_EditorClassIdentifier:
|
m_Version: 2
|
||||||
m_UiScaleMode: 0
|
|
||||||
m_ReferencePixelsPerUnit: 100
|
|
||||||
m_ScaleFactor: 1
|
|
||||||
m_ReferenceResolution: {x: 800, y: 600}
|
|
||||||
m_ScreenMatchMode: 0
|
|
||||||
m_MatchWidthOrHeight: 0
|
|
||||||
m_PhysicalUnit: 3
|
|
||||||
m_FallbackScreenDPI: 96
|
|
||||||
m_DefaultSpriteDPI: 96
|
|
||||||
m_DynamicPixelsPerUnit: 1
|
|
||||||
m_PresetInfoIsWorld: 0
|
|
||||||
--- !u!223 &1507034760
|
|
||||||
Canvas:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1507034757}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 3
|
|
||||||
m_RenderMode: 0
|
|
||||||
m_Camera: {fileID: 0}
|
|
||||||
m_PlaneDistance: 100
|
|
||||||
m_PixelPerfect: 0
|
|
||||||
m_ReceivesEvents: 1
|
|
||||||
m_OverrideSorting: 0
|
|
||||||
m_OverridePixelPerfect: 0
|
|
||||||
m_SortingBucketNormalizedSize: 0
|
|
||||||
m_VertexColorAlwaysGammaSpace: 0
|
|
||||||
m_AdditionalShaderChannelsFlag: 25
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
m_TargetDisplay: 0
|
|
||||||
--- !u!224 &1507034761
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1507034757}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children:
|
|
||||||
- {fileID: 930849161}
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
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_SizeDelta: {x: 0, y: 0}
|
|
||||||
m_Pivot: {x: 0, y: 0}
|
|
||||||
--- !u!1 &1972586253
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1972586256}
|
|
||||||
- component: {fileID: 1972586255}
|
|
||||||
- component: {fileID: 1972586254}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: EventSystem
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &1972586254
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1972586253}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_SendPointerHoverToParent: 1
|
|
||||||
m_HorizontalAxis: Horizontal
|
|
||||||
m_VerticalAxis: Vertical
|
|
||||||
m_SubmitButton: Submit
|
|
||||||
m_CancelButton: Cancel
|
|
||||||
m_InputActionsPerSecond: 10
|
|
||||||
m_RepeatDelay: 0.5
|
|
||||||
m_ForceModuleActive: 0
|
|
||||||
--- !u!114 &1972586255
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1972586253}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_FirstSelected: {fileID: 0}
|
|
||||||
m_sendNavigationEvents: 1
|
|
||||||
m_DragThreshold: 10
|
|
||||||
--- !u!4 &1972586256
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1972586253}
|
|
||||||
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: 0}
|
|
||||||
m_RootOrder: 3
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class JBQ_Test : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetKeyDown(KeyCode.P))
|
||||||
|
{
|
||||||
|
UIManager.Instance.ShowPanel<UI_MaskPanel>(E_UI_Layer.System, (panel) =>
|
||||||
|
{
|
||||||
|
panel.Init();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.L))
|
||||||
|
{
|
||||||
|
EventCenter.Instance.EventTrigger(Enum_EventType.HideMask);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 83c0f087d2600824b823b4975105d63e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -109,3 +109,18 @@ public enum E_ToolOrMaterial
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Material,
|
Material,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 淡入淡出枚举
|
||||||
|
/// </summary>
|
||||||
|
public enum E_FadeInAndOut
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 淡入
|
||||||
|
/// </summary>
|
||||||
|
FadeIn,
|
||||||
|
/// <summary>
|
||||||
|
/// 淡出
|
||||||
|
/// </summary>
|
||||||
|
FadeOut,
|
||||||
|
}
|
|
@ -1,55 +1,95 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class UI_MaskPanel : BasePanel
|
public class UI_MaskPanel : BasePanel
|
||||||
{
|
{
|
||||||
private float fadeInSpeed = 0.5f; // 淡入速度
|
/// <summary>
|
||||||
private float fadeOutSpeed = 0.5f; // 淡出速度
|
/// 淡入淡出速度0.5/s
|
||||||
private float pauseTime = 3f; // 停留时间
|
/// </summary>
|
||||||
|
public float fadeInSpeed = 0.5f; // 淡入速度
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化
|
||||||
|
/// </summary>
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
|
FadeInAndOut(E_FadeInAndOut.FadeIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 淡入/出
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
public void FadeInAndOut(E_FadeInAndOut type)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case E_FadeInAndOut.FadeIn:
|
||||||
|
StartCoroutine(FadeInAsync());
|
||||||
|
break;
|
||||||
|
case E_FadeInAndOut.FadeOut:
|
||||||
|
StartCoroutine(FadeOutAsync());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
private void Start()
|
|
||||||
|
/// <summary>
|
||||||
|
/// 隐藏蒙版
|
||||||
|
/// </summary>
|
||||||
|
private void HideMask()
|
||||||
{
|
{
|
||||||
StartCoroutine(FadeInAndOut());
|
FadeInAndOut(E_FadeInAndOut.FadeOut);
|
||||||
}
|
}
|
||||||
IEnumerator FadeInAndOut()
|
|
||||||
|
/// <summary>
|
||||||
|
/// 淡入
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private IEnumerator FadeInAsync()
|
||||||
{
|
{
|
||||||
Image image_Mask = GetControl<Image>("UI_MaskPanel");
|
|
||||||
// 淡入
|
// 淡入
|
||||||
float alpha = 0.0f;
|
float alpha = 0.0f;
|
||||||
while (alpha < 1.0f)
|
while (alpha < 1.0f)
|
||||||
{
|
{
|
||||||
alpha += fadeInSpeed * Time.deltaTime;
|
alpha += fadeInSpeed * Time.deltaTime;
|
||||||
image_Mask.color = new Color(0, 0, 0, alpha);
|
alpha = Mathf.Clamp(alpha,0,1);
|
||||||
|
GetControl<Image>("Mask").color = new Color(0, 0, 0, alpha);
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 停留
|
/// <summary>
|
||||||
yield return new WaitForSeconds(pauseTime);
|
/// 淡出
|
||||||
|
/// </summary>
|
||||||
// 淡出
|
/// <returns></returns>
|
||||||
alpha = 1.0f;
|
private IEnumerator FadeOutAsync()
|
||||||
|
{
|
||||||
|
// 淡入
|
||||||
|
float alpha = 1.0f;
|
||||||
while (alpha > 0.0f)
|
while (alpha > 0.0f)
|
||||||
{
|
{
|
||||||
alpha -= fadeOutSpeed * Time.deltaTime;
|
alpha -= fadeInSpeed * Time.deltaTime;
|
||||||
image_Mask.color = new Color(0, 0, 0, alpha);
|
alpha = Mathf .Clamp(alpha,0,1);
|
||||||
|
GetControl<Image>("Mask").color = new Color(0, 0, 0, alpha);
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
UIManager.Instance.HidePanel<UI_MaskPanel>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示
|
/// 显示
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void ShowMe()
|
public override void ShowMe()
|
||||||
{
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
EventCenter.Instance.AddEventListener(Enum_EventType.HideMask, HideMask);
|
||||||
|
#else
|
||||||
|
GameManager.EventMgr.AddEventListener(Enum_EventType.HideMask, HideMask);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -57,6 +97,11 @@ public class UI_MaskPanel : BasePanel
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void HideMe()
|
public override void HideMe()
|
||||||
{
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
EventCenter.Instance.RemoveEventListener(Enum_EventType.HideMask, HideMask);
|
||||||
|
#else
|
||||||
|
GameManager.EventMgr.RemoveEventListener(Enum_EventType.HideMask, HideMask);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,9 @@ public enum Enum_EventType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
UpdateProgress,
|
UpdateProgress,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 隐藏黑色蒙版
|
||||||
|
/// </summary>
|
||||||
|
HideMask,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue