抽卡十连相关修改

main
yurui 2025-03-26 16:47:36 +08:00
parent e2b3bd7a33
commit 010e864dc8
15 changed files with 717 additions and 553 deletions

Binary file not shown.

View File

@ -1,80 +1,5 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &194544017724832262
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3699739405066515920}
- component: {fileID: 1436623164650801945}
- component: {fileID: 7952089054428133746}
m_Layer: 5
m_Name: Image_Stuff
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3699739405066515920
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 194544017724832262}
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: 49854960825903888}
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: -184, y: 57.5}
m_SizeDelta: {x: 92, y: 92}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1436623164650801945
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 194544017724832262}
m_CullTransparentMesh: 1
--- !u!114 &7952089054428133746
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 194544017724832262}
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: 9ea706945b9154344b8179d762cc57b2, 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!1 &234164218666920800
GameObject:
m_ObjectHideFlags: 0
@ -210,81 +135,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &422669570471565555
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3250707249546850973}
- component: {fileID: 6291434803974026244}
- component: {fileID: 2385184524867890196}
m_Layer: 5
m_Name: Image_StuffBg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3250707249546850973
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 422669570471565555}
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: 49854960825903888}
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: -184, y: 57}
m_SizeDelta: {x: 144, y: 144}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6291434803974026244
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 422669570471565555}
m_CullTransparentMesh: 1
--- !u!114 &2385184524867890196
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 422669570471565555}
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: b9f27d66f66fd2d478b7770ff15d47bc, 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!1 &884467647881438698
GameObject:
m_ObjectHideFlags: 0
@ -448,8 +298,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3250707249546850973}
- {fileID: 3699739405066515920}
- {fileID: 5811504127147784791}
- {fileID: 8441856994701822346}
m_Father: {fileID: 5476209347617327120}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -470,7 +319,7 @@ GameObject:
- component: {fileID: 5091995902586983300}
- component: {fileID: 6033165111503286273}
m_Layer: 5
m_Name: TextTitle (1)
m_Name: TextTip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -517,7 +366,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
@ -889,7 +738,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
@ -915,7 +764,7 @@ GameObject:
m_Component:
- component: {fileID: 5821954013857372560}
m_Layer: 5
m_Name: UI_DrawExChangePanel
m_Name: UI_RaffleExChange
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1075,7 +924,7 @@ GameObject:
- component: {fileID: 3836818335640673615}
- component: {fileID: 7607446268824732499}
m_Layer: 5
m_Name: Text (Legacy)
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1257,7 +1106,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
@ -1361,8 +1210,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6237611120137967856}
- {fileID: 1080196790400289277}
- {fileID: 5667012267746622850}
- {fileID: 5570061005115679496}
m_Father: {fileID: 5476209347617327120}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -1531,81 +1379,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &6971768171955677978
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1080196790400289277}
- component: {fileID: 2226965847459721054}
- component: {fileID: 5464877003329785928}
m_Layer: 5
m_Name: Image_CreditPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1080196790400289277
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6971768171955677978}
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: 5409182018777274872}
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: -184, y: 57.5}
m_SizeDelta: {x: 92, y: 92}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2226965847459721054
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6971768171955677978}
m_CullTransparentMesh: 1
--- !u!114 &5464877003329785928
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6971768171955677978}
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: 8d5ccc07affdecf45aa266eba0c52ea4, 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!1 &7924598635876359828
GameObject:
m_ObjectHideFlags: 0
@ -1618,7 +1391,7 @@ GameObject:
- component: {fileID: 7707287022805183298}
- component: {fileID: 6221404728988332172}
m_Layer: 5
m_Name: Text (Legacy)
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1816,81 +1589,6 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &8356991569306520720
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6237611120137967856}
- component: {fileID: 5359296934420455034}
- component: {fileID: 1202442325772204561}
m_Layer: 5
m_Name: Image_CreditPointBg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6237611120137967856
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8356991569306520720}
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: 5409182018777274872}
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: -184, y: 57}
m_SizeDelta: {x: 144, y: 144}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5359296934420455034
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8356991569306520720}
m_CullTransparentMesh: 1
--- !u!114 &1202442325772204561
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8356991569306520720}
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: b9f27d66f66fd2d478b7770ff15d47bc, 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!1001 &1780633282286471669
PrefabInstance:
m_ObjectHideFlags: 0
@ -2020,3 +1718,311 @@ RectTransform:
type: 3}
m_PrefabInstance: {fileID: 1780633282286471669}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3385814113720776423
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 49854960825903888}
m_Modifications:
- target: {fileID: 5428043307070786451, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_Name
value: GenericItem
objectReference: {fileID: 0}
- target: {fileID: 5428043307070786451, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7659451222413395475, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_SizeDelta.x
value: 188
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_SizeDelta.x
value: 188
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_SizeDelta.y
value: 188
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalScale.x
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalScale.y
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalScale.z
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -185.1
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 57
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3720d7cdc0e2b344aad835c6907f3c98, type: 3}
--- !u!224 &5811504127147784791 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
m_PrefabInstance: {fileID: 3385814113720776423}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3530552074714083634
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 5409182018777274872}
m_Modifications:
- target: {fileID: 5428043307070786451, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_Name
value: GenericItem
objectReference: {fileID: 0}
- target: {fileID: 5428043307070786451, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7659451222413395475, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_SizeDelta.x
value: 188
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_SizeDelta.x
value: 188
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_SizeDelta.y
value: 188
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalScale.x
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalScale.y
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalScale.z
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -185.1
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 57
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3720d7cdc0e2b344aad835c6907f3c98, type: 3}
--- !u!224 &5667012267746622850 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 9104677325257608368, guid: 3720d7cdc0e2b344aad835c6907f3c98,
type: 3}
m_PrefabInstance: {fileID: 3530552074714083634}
m_PrefabAsset: {fileID: 0}

View File

@ -139,6 +139,7 @@ public partial class UIManager
_WindowMeta(UINameConst.UI_PVAnimaPlay, UIWindowLayer.Guide, UIOpenType.FullScreen);
_WindowMeta(UINameConst.UIGiftCode, UIWindowLayer.Normal);
_WindowMeta(UINameConst.UI_DrawPanelRoleInfo, UIWindowLayer.Normal, UIOpenType.FullScreen);
_WindowMeta(UINameConst.UI_RaffleExChange, UIWindowLayer.Normal, UIOpenType.FullScreen);
//关卡
_WindowMeta(UINameConst.UI_LevelSelect, UIWindowLayer.Normal, UIOpenType.FullScreen, true, true);
@ -375,6 +376,10 @@ public static class UINameConst
/// 抽卡up角色详情界面
/// </summary>
public static readonly string UI_DrawPanelRoleInfo = "DrawPanel/UI_DrawPanelRoleInfo";
/// <summary>
/// 抽卡券不足提示兑换界面
/// </summary>
public static readonly string UI_RaffleExChange = "DrawPanel/UI_RaffleExChange";
#endregion
/// <summary>

View File

@ -48,7 +48,7 @@ public struct RaffleButtonData
}
}
/// <summary>
/// 抽卡券能抽取
/// 是否只用抽卡券能抽取
/// </summary>
public readonly bool IsTicketRaffle { get { return CategoryManager.Instance.GetItemCount(Cfg.TicketItemID) >= Count; } }
/// <summary>

View File

@ -1,10 +1,13 @@
using cfg.ActorCfg;
using Framework;
using Gameplay;
using Gameplay.Net;
using PhxhSDK;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static MagicaCloth2.TeamManager;
/// <summary>
/// 抽卡管理器
@ -20,6 +23,11 @@ public class RaffleManager : Singlenton<RaffleManager>, IInitable
/// 抽卡券道具id集合
/// </summary>
private HashSet<int> setRaffleItemId;
/// <summary>
/// 抽卡结果数据
/// </summary>
private RaffleResultData resultData;
/// <summary>
/// 所有卡池数据字典
/// </summary>
@ -39,10 +47,12 @@ public class RaffleManager : Singlenton<RaffleManager>, IInitable
EventManager.Instance.Register(EventManager.EventName.AllConfigLoad, LoadRaffleData);
EventManager.Instance.Register(EventManager.EventName.RaffleRefresh, RefreshData);
EventManager.Instance.Register<uint>(EventManager.EventName.ItemChange, CheckRefreshData);
EventManager.Instance.Register(EventManager.EventName.RaffleResult, (Action<ItemCounts>)OnRaffleResult);
}
public void Release()
{
EventManager.Instance.Unregister(EventManager.EventName.RaffleResult, (Action<ItemCounts>)OnRaffleResult);
EventManager.Instance.Unregister<uint>(EventManager.EventName.ItemChange, CheckRefreshData);
EventManager.Instance.Unregister(EventManager.EventName.RaffleRefresh, RefreshData);
EventManager.Instance.Unregister(EventManager.EventName.AllConfigLoad, LoadRaffleData);
@ -67,47 +77,31 @@ public class RaffleManager : Singlenton<RaffleManager>, IInitable
}
/// <summary>
/// 抽卡
/// 抽卡校验
/// </summary>
public void Raffle(RaffleButtonData data)
public async void CheckRaffle(RaffleButtonData data)
{
if (data.IsFreeOne || data.IsTicketRaffle)
{
NetHelper.Raffle((uint)data.Cfg.Id, data.IsFreeOne, (uint)data.Count);
Raffle(data);
return;
}
await UI_RaffleExChangeController.Open(data);
}
/*DataItem itemData = TableManager.Instance.Tables.Item.Get(data.CostId);
if (Actor.Instance.Item.GetItemCount(data.CostId) < (uint)data.SingleCost)
{
if (null != itemData)
{
UITipsManager.ShowConfirmOne(CommonUtils.GetLocalizeText("ui_tip"), // 提示
string.Format(CommonUtils.GetLocalizeText("Gacha_ItemNotEnough"), CommonUtils.GetLocalizeText(itemData.NameLocal)),
null); // 准尉,您的{0}和{1}目前储量不足,请通过商店补给后再来进行招募吧
}
return;
}
if (null == drawData)
drawData = new(curTab.RaffleData.Cfg);
/// <summary>
/// 抽卡
/// </summary>
/// <param name="data"></param>
public void Raffle(RaffleButtonData data)
{
if (null == resultData)
resultData = new RaffleResultData(data.Cfg);
else
drawData.Reset(curTab.RaffleData.Cfg);
resultData.Reset(data.Cfg);
if (data.IsMoney)
{
UITipsManager.ShowConfirmTwo(CommonUtils.GetLocalizeText("ui_tip"), // 提示
string.Format(CommonUtils.GetLocalizeText("Gacha_DiamondDrawTip"), CommonUtils.GetLocalizeText(itemData.NameLocal), data.SingleCost), // 是否花费{0}x{1}抽取
CommonUtils.GetLocalizeText("ui_yes"), // 是
CommonUtils.GetLocalizeText("ui_no"), // 否
() => { NetHelper.Raffle((uint)curTab.RaffleData.Cfg.Id, data.IsFreeOne, (uint)data.ServerData); });
}
else
{
NetHelper.Raffle((uint)curTab.RaffleData.Cfg.Id, data.IsFreeOne, (uint)data.ServerData);
}*/
NetHelper.Raffle((uint)data.Cfg.Id, data.IsFreeOne, (uint)data.Count);
}
/// <summary>
@ -148,4 +142,14 @@ public class RaffleManager : Singlenton<RaffleManager>, IInitable
RefreshData();
}
/// <summary>
/// 抽卡结果
/// </summary>
/// <param name="itemCounts"></param>
private async void OnRaffleResult(ItemCounts itemCounts)
{
resultData.SetInfo(itemCounts);
await UI_RaffleAnimController.Open(resultData);
}
}

View File

@ -0,0 +1,169 @@
using cfg.ActorCfg;
using cfg.CharacterCfg;
using Framework;
using Gameplay.Net;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 抽卡结果数据
/// </summary>
public class RaffleResultData
{
/// <summary>
/// 抽卡数据
/// </summary>
private DataGacha gachaData;
/// <summary>
/// 初始天井币数量
/// </summary>
private int patioCount;
/// <summary>
/// 记录抽卡前拥有的角色id
/// </summary>
private HashSet<int> setCharacterId;
/// <summary>
/// 记录每个角色是否是新获得的和listCharacter一一对应
/// </summary>
private List<bool> listIsNew;
/// <summary>
/// 角色数据列表
/// </summary>
private List<DataCharacterAttri> listCharacter;
/// <summary>
/// 显示角色索引
/// </summary>
public int ShowIndex;
#region 属性
/// <summary>
/// 记录角色是否新获得
/// </summary>
public List<bool> ListIsNew
{
get { return listIsNew; }
}
/// <summary>
/// 所有角色信息
/// </summary>
public List<DataCharacterAttri> ListCharacter
{
get { return listCharacter; }
}
/// <summary>
/// 卡池数据
/// </summary>
public DataGacha GachaData
{
get { return gachaData; }
}
/// <summary>
/// 最大星级
/// </summary>
public int MaxStartStar
{
get; private set;
}
/// <summary>
/// 是否有下一个要显示的
/// </summary>
public bool IsShowNext
{
get { return ShowIndex < listCharacter.Count - 1; }
}
/// <summary>
/// 是否可以获得天井币
/// </summary>
public bool IsGetPatio
{
get { return 0 != gachaData.PatioCoin; }
}
/// <summary>
/// 初始天井币数量
/// </summary>
public int PatioCount
{
get { return patioCount; }
}
#endregion
public DataCharacterAttri CharacterAttri
{
get
{
if (ShowIndex >= ListCharacter.Count)
return null;
return ListCharacter[ShowIndex];
}
}
public RaffleResultData(DataGacha dataGacha)
{
Reset(dataGacha);
}
public void SetInfo(ItemCounts itemCounts)
{
listCharacter.Clear();
listIsNew.Clear();
MaxStartStar = 0;
ShowIndex = 0;
foreach (uint characterId in itemCounts.Ids)
{
DataCharacterAttri cfg = TableManager.Instance.Tables.CharacterAttri.GetOrDefault((int)characterId);
listCharacter.Add(cfg);
DebugUtil.Log($"本次抽取角色id{characterId}");
if (cfg == null)
{
listIsNew.Add(false);
DebugUtil.LogError($"获取角色配置错误, 错误id{characterId}");
continue;
}
listIsNew.Add(setCharacterId.Add(cfg.RoleID));
if (MaxStartStar < cfg.StartStar)
MaxStartStar = cfg.StartStar;
}
}
public void Reset(DataGacha dataGacha)
{
gachaData = dataGacha;
if (IsGetPatio)
patioCount = (int)Actor.Instance.Item.GetItemCount(gachaData.PatioCoin);
if (null == listCharacter)
listCharacter = new(16);
else
listCharacter.Clear();
if (null == listIsNew)
listIsNew = new(16);
else
listIsNew.Clear();
if (null == setCharacterId)
setCharacterId = new();
else
setCharacterId.Clear();
MaxStartStar = 0;
ShowIndex = 0;
foreach (CharacterDataInfo characterDataInfo in CharacterDataInfoManager.Instance.DataList)
{
setCharacterId.Add(characterDataInfo.Cfg.RoleID);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dba7da03b1be95146902ee19ded95f10
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -26,12 +26,12 @@ public class UI_DrawMainPanelController : UIWindow
// 切换场景会有瞬间卡顿先打开UI
UIWindow uiWindow = await UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_DrawMain);
LoadDrawScene();
LoadRaffleScene();
return uiWindow;
}
private static async void LoadDrawScene()
private static async void LoadRaffleScene()
{
await GameSceneHelper.Instance.LoadSceneForUIView(Constants.RAFFLE_SCENE_PATH);
CommonUtils.ChangeUIScene(Constants.RAFFLE_SCENE_PATH); // 切换到抽卡场景
@ -431,10 +431,6 @@ public class UI_DrawMainPanelController : UIWindow
/// 当前选中id
/// </summary>
private int curSelectId;
/// <summary>
/// 抽卡数据
/// </summary>
private DrawData drawData;
#endregion
public override void OnInit()
@ -518,19 +514,10 @@ public class UI_DrawMainPanelController : UIWindow
/// 抽卡结果
/// </summary>
/// <param name="itemCounts"></param>
private async void OnRaffleResult(ItemCounts itemCounts)
private void OnRaffleResult(ItemCounts itemCounts)
{
RefreshData();
RefreshPool();
if (0 >= itemCounts.Ids.Count)
{
DebugUtil.LogError("没有东西");
return;
}
drawData.SetInfo(itemCounts);
await UI_RaffleAnimController.Open(drawData);
}
#region 刷新
@ -717,25 +704,7 @@ public class UI_DrawMainPanelController : UIWindow
{
AudioManager.Instance.PlayAudio(Constants.Sound.Raffle, AudioCriManager.EPlayType.Sound);
if (null == curTab)
{
DebugUtil.LogError("错误,没有选中卡池");
return;
}
RaffleManager.Instance.Raffle(data);
}
/// <summary>
/// 保底
/// </summary>
private void OnBreakEven()
{
// NetHelper.PatioExchange(1, 0);
/*NormalShopDataForGacha normalShopDataForGacha = new(mNowRafflePool.Cfg.PatioItemList, mNowRafflePool.Cfg.PatioPrice);
await UIManager.Instance.OpenWindow(UINameConst.UI_Patio, normalShopDataForGacha);*/
RaffleManager.Instance.CheckRaffle(data);
}
/// <summary>
@ -772,166 +741,4 @@ public class UI_DrawMainPanelController : UIWindow
textPatio.text = Actor.Instance.Item.GetItemCount(curTab.RaffleData.Cfg.PatioCoin).ToString();
}
#endregion
}
/// <summary>
/// 抽卡数据
/// </summary>
public class DrawData
{
/// <summary>
/// 抽卡数据
/// </summary>
private DataGacha gachaData;
/// <summary>
/// 初始天井币数量
/// </summary>
private int patioCount;
/// <summary>
/// 记录抽卡前拥有的角色id
/// </summary>
private HashSet<int> setCharacterId;
/// <summary>
/// 记录每个角色是否是新获得的和listCharacter一一对应
/// </summary>
private List<bool> listIsNew;
/// <summary>
/// 角色数据列表
/// </summary>
private List<DataCharacterAttri> listCharacter;
/// <summary>
/// 显示角色索引
/// </summary>
public int ShowIndex;
#region 属性
/// <summary>
/// 记录角色是否新获得
/// </summary>
public List<bool> ListIsNew
{
get { return listIsNew; }
}
/// <summary>
/// 所有角色信息
/// </summary>
public List<DataCharacterAttri> ListCharacter
{
get { return listCharacter; }
}
/// <summary>
/// 卡池数据
/// </summary>
public DataGacha GachaData
{
get { return gachaData; }
}
/// <summary>
/// 最大星级
/// </summary>
public int MaxStartStar
{
get; private set;
}
/// <summary>
/// 是否有下一个要显示的
/// </summary>
public bool IsShowNext
{
get { return ShowIndex < listCharacter.Count - 1; }
}
/// <summary>
/// 是否可以获得天井币
/// </summary>
public bool IsGetPatio
{
get { return 0 != gachaData.PatioCoin; }
}
/// <summary>
/// 初始天井币数量
/// </summary>
public int PatioCount
{
get { return patioCount; }
}
#endregion
public DataCharacterAttri CharacterAttri
{
get
{
if (ShowIndex >= ListCharacter.Count)
return null;
return ListCharacter[ShowIndex];
}
}
public DrawData(DataGacha dataGacha)
{
Reset(dataGacha);
}
public void SetInfo(ItemCounts itemCounts)
{
listCharacter.Clear();
listIsNew.Clear();
MaxStartStar = 0;
ShowIndex = 0;
foreach (uint characterId in itemCounts.Ids)
{
DataCharacterAttri cfg = TableManager.Instance.Tables.CharacterAttri.GetOrDefault((int)characterId);
listCharacter.Add(cfg);
DebugUtil.Log($"本次抽取角色id{characterId}");
if (cfg == null)
{
listIsNew.Add(false);
DebugUtil.LogError($"获取角色配置错误, 错误id{characterId}");
continue;
}
listIsNew.Add(setCharacterId.Add(cfg.RoleID));
if (MaxStartStar < cfg.StartStar)
MaxStartStar = cfg.StartStar;
}
}
public void Reset(DataGacha dataGacha)
{
gachaData = dataGacha;
if (IsGetPatio)
patioCount = (int)Actor.Instance.Item.GetItemCount(gachaData.PatioCoin);
if (null == listCharacter)
listCharacter = new(16);
else
listCharacter.Clear();
if (null == listIsNew)
listIsNew = new(16);
else
listIsNew.Clear();
if (null == setCharacterId)
setCharacterId = new();
else
setCharacterId.Clear();
MaxStartStar = 0;
ShowIndex = 0;
foreach (CharacterDataInfo characterDataInfo in CharacterDataInfoManager.Instance.DataList)
{
setCharacterId.Add(characterDataInfo.Cfg.RoleID);
}
}
}

View File

@ -16,7 +16,7 @@ public class UI_DrawPannelCharacterController : UIWindow
/// <summary>
/// 打开抽卡主界面
/// </summary>
public static async UniTask<UIWindow> Open(DrawData drawData)
public static async UniTask<UIWindow> Open(RaffleResultData drawData)
{
return await UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_DrawPannelCharacter, drawData);
}
@ -107,7 +107,7 @@ public class UI_DrawPannelCharacterController : UIWindow
/// <summary>
/// 抽卡数据
/// </summary>
private DrawData drawData;
private RaffleResultData drawData;
/// <summary>
/// 角色立绘路径
/// </summary>
@ -123,7 +123,7 @@ public class UI_DrawPannelCharacterController : UIWindow
public override async void PreLoad(object data = null)
{
if (data is not DrawData draw)
if (data is not RaffleResultData draw)
{
DebugUtil.LogError("数据错误");
return;
@ -311,7 +311,7 @@ public class UI_DrawPannelCharacterController : UIWindow
/// 预加载资源
/// </summary>
/// <param name="drawData"></param>
private async UniTask PreLoadAssets(DrawData drawData)
private async UniTask PreLoadAssets(RaffleResultData drawData)
{
DataCharacterAttri cfg = drawData.CharacterAttri;
if (null == cfg)

View File

@ -18,7 +18,7 @@ public class UI_DrawResultCharactersController : UIWindow
/// <summary>
/// 打开抽卡结果界面
/// </summary>
public static async UniTask<UIWindow> Open(DrawData drawData)
public static async UniTask<UIWindow> Open(RaffleResultData drawData)
{
return await UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_DrawResultCharacters, drawData);
}
@ -209,7 +209,7 @@ public class UI_DrawResultCharactersController : UIWindow
protected override void OnShowWindow(object data = null)
{
if (data is not DrawData drawData)
if (data is not RaffleResultData drawData)
return;
if (drawData.IsGetPatio)

View File

@ -0,0 +1,151 @@
using cfg.ActorCfg;
using Cysharp.Threading.Tasks;
using Framework;
using Gameplay;
using System;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 抽卡券不足提示兑换界面
/// </summary>
public sealed class UI_RaffleExChangeController : UIWindow
{
/// <summary>
/// 打开抽卡券不足提示兑换界面
/// </summary>
public static async UniTask<UIWindow> Open(RaffleButtonData data)
{
CommonUtils.CaptureScreenshot(); // 截取当前屏幕截图
return await UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_RaffleExChange, data);
}
#region UI
/// <summary>
/// 高斯模糊遮罩
/// </summary>
private RawImage rawImageGaussianBlurMask;
/// <summary>
/// 关闭按钮
/// </summary>
private Button buttonClose;
/// <summary>
/// 取消按钮
/// </summary>
private Button buttonCancel;
/// <summary>
/// 确定按钮
/// </summary>
private Button buttonOk;
/// <summary>
/// 提示文本
/// </summary>
private TMP_Text textTip;
/// <summary>
/// 消耗道具文本
/// </summary>
private TMP_Text textCost;
/// <summary>
/// 兑换道具文本
/// </summary>
private TMP_Text textChange;
#endregion
/// <summary>
/// 消耗道具
/// </summary>
private GenericItem costItem;
/// <summary>
/// 兑换道具
/// </summary>
private GenericItem changeItem;
/// <summary>
/// 抽卡数据
/// </summary>
private RaffleButtonData raffleData;
public override void OnInit()
{
rawImageGaussianBlurMask = GetComponent<RawImage>("GaussianBlurMask");
buttonClose = GetComponent<Button>("TopNode/Button_Close");
buttonCancel = GetComponent<Button>("MidNode/Button_CancelBtn");
buttonOk = GetComponent<Button>("MidNode/Button_ConfirmBtn");
textTip = GetComponent<TMP_Text>("MidNode/TextTip");
textCost = GetComponent<TMP_Text>("MidNode/CreditPoint/Text_CreditPointNum");
textChange = GetComponent<TMP_Text>("MidNode/Stuff/Text_StuffNum");
rawImageGaussianBlurMask.texture = CommonUtils.GetScreenTexture2D();
costItem = new GenericItem(FindObj("MidNode/CreditPoint/GenericItem"));
changeItem = new GenericItem(FindObj("MidNode/Stuff/GenericItem"));
CommonUtils.BindButton(buttonClose, OnClose);
CommonUtils.BindButton(buttonCancel, OnClose);
CommonUtils.BindButton(buttonOk, OnRaffle);
}
protected override void OnShowWindow(object data)
{
base.OnShowWindow(data);
if (data is not RaffleButtonData raffleButtonData)
return;
raffleData = raffleButtonData;
DataItem costItemData = TableManager.Instance.Tables.Item.Get(raffleData.CostId);
if (null == costItemData)
{
DebugUtil.LogError($"获取道具配置失败id:{raffleData.CostId}");
return;
}
DataItem changeItemData = TableManager.Instance.Tables.Item.Get(raffleData.Cfg.TicketItemID);
if (null == changeItemData)
{
DebugUtil.LogError($"获取道具配置失败id:{raffleData.Cfg.TicketItemID}");
return;
}
costItem.SetInfo(costItemData);
changeItem.SetInfo(changeItemData);
int needCount = raffleButtonData.Count-(int)CategoryManager.Instance.GetItemCount(raffleButtonData.Cfg.TicketItemID);
if (needCount > 0)
{
int needCost = needCount * raffleButtonData.SingleCost;
string costName = CommonUtils.GetLocalizeText(costItemData.NameLocal);
string changeName = CommonUtils.GetLocalizeText(changeItemData.NameLocal);
textCost.text = $"{costName}X{needCost}";
textChange.text = $"{changeName}X{needCount}";
textTip.text = string.Format("缺少{0}张{1},是否消耗{2}{3}兑换", needCount, changeName, needCost, costName); // TODO 本地化
}
}
private void OnClose()
{
CloseWindow();
}
public override void OnRelease()
{
costItem?.Dispose();
changeItem?.Dispose();
base.OnRelease();
}
private async void OnRaffle()
{
if (!raffleData.IsRaffle)
{
await UI_CreditPointExchangePanelController.Open();
return;
}
RaffleManager.Instance.Raffle(raffleData);
OnClose();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f4d7eab2a26fe7e40bdcc63769769266
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -17,7 +17,7 @@ public class UI_RaffleAnimController : UIWindow
/// <summary>
/// 打开抽卡动画界面
/// </summary>
public static async UniTask<UIWindow> Open(DrawData drawData)
public static async UniTask<UIWindow> Open(RaffleResultData drawData)
{
return await UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_RaffleAnim, drawData);
}
@ -53,7 +53,7 @@ public class UI_RaffleAnimController : UIWindow
/// <summary>
/// 抽卡结果数据
/// </summary>
private DrawData drawData;
private RaffleResultData drawData;
/// <summary>
/// 使用的视频路径
/// </summary>
@ -80,7 +80,7 @@ public class UI_RaffleAnimController : UIWindow
public override void PreLoad(object data = null)
{
if (data is DrawData raffle)
if (data is RaffleResultData raffle)
drawData = raffle;
if (drawData.MaxStartStar >= 5) // TODO 测试随机概率20%

View File

@ -15,7 +15,7 @@ public class UI_RaffleOneResultController : UIWindow
/// <summary>
/// 打开单次抽卡结果界面
/// </summary>
public static async UniTask<UIWindow> Open(DrawData raffleData)
public static async UniTask<UIWindow> Open(RaffleResultData raffleData)
{
CommonUtils.ChangeUIScene(Constants.RAFFLE_SCENE_PATH); // 切换到抽卡场景
@ -45,7 +45,7 @@ public class UI_RaffleOneResultController : UIWindow
/// 台词语音
/// </summary>
private AudioInst _dialogueAudioCri;
private DrawData drawData;
private RaffleResultData drawData;
public override void OnInit()
{
@ -60,7 +60,7 @@ public class UI_RaffleOneResultController : UIWindow
public override async void PreLoad(object data = null)
{
if (data is not DrawData draw)
if (data is not RaffleResultData draw)
{
DebugUtil.LogError("数据错误");
return;