From aabaecc1d2851f2f93f36793d093d4e154f60af0 Mon Sep 17 00:00:00 2001 From: yangjing Date: Tue, 15 Feb 2022 15:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=85=B3=E5=8D=A1=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E6=97=A0=E5=B9=BF=E5=91=8A=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E5=BD=93=E5=89=8D=E5=85=B3=E5=8D=A1=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Resources/Film/17.prefab | 2 +- Assets/Resources/Film/27.prefab | 2 +- Assets/Resources/Film/28.prefab | 2 +- Assets/Resources/Film/29.prefab | 2 +- Assets/Resources/Film/30.prefab | 2 +- Assets/Resources/Film/7.prefab | 2 +- Assets/Resources/UIs/PanelLevel.prefab | 208 +++++++++++-- Assets/Resources/UIs/PanelNoAdsTip.prefab | 274 ++++++++++++++++++ .../Resources/UIs/PanelNoAdsTip.prefab.meta | 7 + Assets/Scenes/Game.unity | 191 +++++++++++- Assets/Scripts/UI/CustomControl/EndingCell.cs | 5 +- .../UI/CustomControl/LevelList/LevelCell.cs | 6 + .../UI/CustomControl/LevelList/LevelPage.cs | 20 +- Assets/Scripts/UI/CustomControl/PageView.cs | 3 + Assets/Scripts/UI/PanelLevel.cs | 1 + Assets/Scripts/UI/PanelNoAdsTip.cs | 42 +++ Assets/Scripts/UI/PanelNoAdsTip.cs.meta | 11 + 17 files changed, 746 insertions(+), 34 deletions(-) create mode 100644 Assets/Resources/UIs/PanelNoAdsTip.prefab create mode 100644 Assets/Resources/UIs/PanelNoAdsTip.prefab.meta create mode 100644 Assets/Scripts/UI/PanelNoAdsTip.cs create mode 100644 Assets/Scripts/UI/PanelNoAdsTip.cs.meta diff --git a/Assets/Resources/Film/17.prefab b/Assets/Resources/Film/17.prefab index defd08ac..45b45c06 100644 --- a/Assets/Resources/Film/17.prefab +++ b/Assets/Resources/Film/17.prefab @@ -144,7 +144,7 @@ PrefabInstance: - target: {fileID: 93290717907453021, guid: ede363a561f856b40b0412492ae8dae4, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -60 objectReference: {fileID: 0} - target: {fileID: 93290717907453021, guid: ede363a561f856b40b0412492ae8dae4, type: 3} diff --git a/Assets/Resources/Film/27.prefab b/Assets/Resources/Film/27.prefab index 3e376380..e13a875d 100644 --- a/Assets/Resources/Film/27.prefab +++ b/Assets/Resources/Film/27.prefab @@ -144,7 +144,7 @@ PrefabInstance: - target: {fileID: 944159204811120249, guid: 1383508f47bd49042ae8cbf2518288c5, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: 230 objectReference: {fileID: 0} - target: {fileID: 944159204811120249, guid: 1383508f47bd49042ae8cbf2518288c5, type: 3} diff --git a/Assets/Resources/Film/28.prefab b/Assets/Resources/Film/28.prefab index be81c23a..93624767 100644 --- a/Assets/Resources/Film/28.prefab +++ b/Assets/Resources/Film/28.prefab @@ -144,7 +144,7 @@ PrefabInstance: - target: {fileID: 6299455999311976264, guid: 584e47329c792fa498101e040e5da3be, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -30 objectReference: {fileID: 0} - target: {fileID: 6299455999311976264, guid: 584e47329c792fa498101e040e5da3be, type: 3} diff --git a/Assets/Resources/Film/29.prefab b/Assets/Resources/Film/29.prefab index 99fc6589..fd539eb3 100644 --- a/Assets/Resources/Film/29.prefab +++ b/Assets/Resources/Film/29.prefab @@ -144,7 +144,7 @@ PrefabInstance: - target: {fileID: 2101340347171846756, guid: 5c2753c12e5321548bd8e35a5871cd7a, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: 170 objectReference: {fileID: 0} - target: {fileID: 2101340347171846756, guid: 5c2753c12e5321548bd8e35a5871cd7a, type: 3} diff --git a/Assets/Resources/Film/30.prefab b/Assets/Resources/Film/30.prefab index dffbf679..94c4e130 100644 --- a/Assets/Resources/Film/30.prefab +++ b/Assets/Resources/Film/30.prefab @@ -144,7 +144,7 @@ PrefabInstance: - target: {fileID: 2636540650326104169, guid: ab4696be303daf4489607bebc198e6aa, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: 130 objectReference: {fileID: 0} - target: {fileID: 2636540650326104169, guid: ab4696be303daf4489607bebc198e6aa, type: 3} diff --git a/Assets/Resources/Film/7.prefab b/Assets/Resources/Film/7.prefab index d811d234..779e1a1e 100644 --- a/Assets/Resources/Film/7.prefab +++ b/Assets/Resources/Film/7.prefab @@ -149,7 +149,7 @@ PrefabInstance: - target: {fileID: 4922886267170618119, guid: 5b96d5565cc7439428eb29a29ac52d0a, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -90 objectReference: {fileID: 0} - target: {fileID: 4922886267170618119, guid: 5b96d5565cc7439428eb29a29ac52d0a, type: 3} diff --git a/Assets/Resources/UIs/PanelLevel.prefab b/Assets/Resources/UIs/PanelLevel.prefab index 5bf1161c..ce679af5 100644 --- a/Assets/Resources/UIs/PanelLevel.prefab +++ b/Assets/Resources/UIs/PanelLevel.prefab @@ -978,6 +978,7 @@ MonoBehaviour: mGobDone: {fileID: 1549853547994234811} mGobComplete: {fileID: 7274106816053439044} mImgProgress: {fileID: 7274106814941670833} + mGobCurrent: {fileID: 7805014795765387909} mGobEmpty: {fileID: 1890007151263563442} mBtnComingSoon: {fileID: 7010971288309089060} mImgComingSoon: {fileID: 6099835323015152707} @@ -1017,6 +1018,7 @@ RectTransform: - {fileID: 7274106814010849299} - {fileID: 7274106816053439045} - {fileID: 7274106814941670832} + - {fileID: 1080700449647581887} m_Father: {fileID: 1549853548759154686} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1220,7 +1222,6 @@ GameObject: m_Component: - component: {fileID: 1549853549434864437} - component: {fileID: 2134253801646824259} - - component: {fileID: 923398011} m_Layer: 5 m_Name: PanelLevel m_TagString: Untagged @@ -1266,19 +1267,6 @@ MonoBehaviour: mBtnBack: {fileID: 1549853548048420530} mBtnBackToMain: {fileID: 1549853548561325180} mLvPage: {fileID: 2313535500816353668} ---- !u!114 &923398011 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1549853549434864438} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2fc7dc4f2dbf74088998b4077cae77cd, type: 3} - m_Name: - m_EditorClassIdentifier: - OffsetY: 65 --- !u!1 &1890007151171864230 GameObject: m_ObjectHideFlags: 0 @@ -1299,7 +1287,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1890007151171864231 RectTransform: m_ObjectHideFlags: 0 @@ -1448,7 +1436,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1890007151263563443 RectTransform: m_ObjectHideFlags: 0 @@ -1615,7 +1603,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 15, y: 10} + m_AnchoredPosition: {x: 15, y: -15} m_SizeDelta: {x: 26, y: 47} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5100940484003565473 @@ -1689,7 +1677,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -15, y: 10} + m_AnchoredPosition: {x: -15, y: -15} m_SizeDelta: {x: 26, y: 47} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5767648501680561061 @@ -1965,7 +1953,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: -450} + m_AnchoredPosition: {x: 0, y: -470} m_SizeDelta: {x: 640, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &4965647244722132842 @@ -2309,6 +2297,186 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7805014795765387909 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1080700449647581887} + - component: {fileID: 2503706951852330333} + - component: {fileID: 7747853895418403708} + - component: {fileID: 7716640785937449482} + m_Layer: 5 + m_Name: Gob_Current + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1080700449647581887 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7805014795765387909} + 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_Children: [] + m_Father: {fileID: 1549853548948624558} + m_RootOrder: 4 + 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: 40, y: 50} + m_SizeDelta: {x: 73, y: 63} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &2503706951852330333 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7805014795765387909} + m_CullTransparentMesh: 0 +--- !u!114 &7747853895418403708 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7805014795765387909} + 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: 0 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ca54e057c245c49768d734563d440504, 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!114 &7716640785937449482 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7805014795765387909} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d0390bd8b8ffd640b34fe25065ff1df, type: 3} + m_Name: + m_EditorClassIdentifier: + updateType: 0 + isSpeedBased: 0 + hasOnStart: 0 + hasOnPlay: 0 + hasOnUpdate: 0 + hasOnStepComplete: 0 + hasOnComplete: 0 + hasOnTweenCreated: 0 + hasOnRewind: 0 + onStart: + m_PersistentCalls: + m_Calls: [] + onPlay: + m_PersistentCalls: + m_Calls: [] + onUpdate: + m_PersistentCalls: + m_Calls: [] + onStepComplete: + m_PersistentCalls: + m_Calls: [] + onComplete: + m_PersistentCalls: + m_Calls: [] + onTweenCreated: + m_PersistentCalls: + m_Calls: [] + onRewind: + m_PersistentCalls: + m_Calls: [] + targetIsSelf: 1 + targetGO: {fileID: 0} + tweenTargetIsTargetGO: 1 + delay: 0 + duration: 0.5 + easeType: 6 + easeCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + loopType: 1 + loops: -1 + id: + isRelative: 0 + isFrom: 0 + isIndependentUpdate: 0 + autoKill: 1 + isActive: 1 + isValid: 1 + target: {fileID: 1080700449647581887} + animationType: 2 + targetType: 11 + forcedTargetType: 0 + autoPlay: 1 + useTargetAsV3: 0 + endValueFloat: 0 + endValueV3: {x: 40, y: 60, z: 0} + endValueV2: {x: 0, y: 0} + endValueColor: {r: 1, g: 1, b: 1, a: 1} + endValueString: + endValueRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + endValueTransform: {fileID: 0} + optionalBool0: 0 + optionalFloat0: 0 + optionalInt0: 0 + optionalRotationMode: 0 + optionalScrambleMode: 0 + optionalString: --- !u!1 &9135682575315895655 GameObject: m_ObjectHideFlags: 0 @@ -2360,7 +2528,7 @@ MonoBehaviour: m_Padding: m_Left: 0 m_Right: 0 - m_Top: 30 + m_Top: 60 m_Bottom: 0 m_ChildAlignment: 1 m_StartCorner: 0 diff --git a/Assets/Resources/UIs/PanelNoAdsTip.prefab b/Assets/Resources/UIs/PanelNoAdsTip.prefab new file mode 100644 index 00000000..fc7cd9d1 --- /dev/null +++ b/Assets/Resources/UIs/PanelNoAdsTip.prefab @@ -0,0 +1,274 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &569511672016175205 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4604997161300454659} + - component: {fileID: 6631105360525122228} + - component: {fileID: 3740063429784227229} + - component: {fileID: 3294715531618941101} + m_Layer: 5 + m_Name: Btn_Mask + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4604997161300454659 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 569511672016175205} + 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_Children: [] + m_Father: {fileID: 5778087624961889421} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 900, y: 1500} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6631105360525122228 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 569511672016175205} + m_CullTransparentMesh: 0 +--- !u!114 &3740063429784227229 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 569511672016175205} + 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_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 40daafba09ffb48c5a3295f9bcf6eaaf, 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!114 &3294715531618941101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 569511672016175205} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 3740063429784227229} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!1 &3592745272336509431 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4672707806408985493} + - component: {fileID: 3831674621271817231} + - component: {fileID: 2746097916508042876} + - component: {fileID: 3294715530744223699} + m_Layer: 5 + m_Name: Rct_Bg + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4672707806408985493 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3592745272336509431} + 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_Children: [] + m_Father: {fileID: 5778087624961889421} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 100} + m_SizeDelta: {x: 552, y: 337} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3831674621271817231 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3592745272336509431} + m_CullTransparentMesh: 0 +--- !u!114 &2746097916508042876 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3592745272336509431} + 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: 0 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 42bb7f3513e364097971b156db9b2b31, 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!225 &3294715530744223699 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3592745272336509431} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &5778087624961889420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5778087624961889421} + - component: {fileID: 3724220538102379760} + - component: {fileID: 392595252793710533} + m_Layer: 5 + m_Name: PanelNoAdsTip + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5778087624961889421 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5778087624961889420} + 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_Children: + - {fileID: 4604997161300454659} + - {fileID: 4672707806408985493} + m_Father: {fileID: 0} + 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!114 &3724220538102379760 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5778087624961889420} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 108afb2cf48604914a9e62440d34b7d2, type: 3} + m_Name: + m_EditorClassIdentifier: + mCvsBg: {fileID: 3294715530744223699} + mRctBg: {fileID: 4672707806408985493} + mBtnMask: {fileID: 3294715531618941101} +--- !u!114 &392595252793710533 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5778087624961889420} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2fc7dc4f2dbf74088998b4077cae77cd, type: 3} + m_Name: + m_EditorClassIdentifier: + OffsetY: 65 diff --git a/Assets/Resources/UIs/PanelNoAdsTip.prefab.meta b/Assets/Resources/UIs/PanelNoAdsTip.prefab.meta new file mode 100644 index 00000000..d9be3f84 --- /dev/null +++ b/Assets/Resources/UIs/PanelNoAdsTip.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5fb017c7a4a304f338c156928a51c275 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index 3caf7938..ddcc19c5 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -271,6 +271,56 @@ Transform: m_Father: {fileID: 493959136} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &841774912 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 841774913} + - component: {fileID: 841774914} + m_Layer: 5 + m_Name: Stage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &841774913 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 841774912} + 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_Children: + - {fileID: 2101175959} + m_Father: {fileID: 1041748534} + m_RootOrder: 1 + 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!114 &841774914 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 841774912} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2fc7dc4f2dbf74088998b4077cae77cd, type: 3} + m_Name: + m_EditorClassIdentifier: + OffsetY: 65 --- !u!1 &981190535 GameObject: m_ObjectHideFlags: 0 @@ -304,6 +354,7 @@ RectTransform: - {fileID: 987875187} - {fileID: 8767444850111818679} - {fileID: 8174312654083100069} + - {fileID: 3983645218197209946} m_Father: {fileID: 1041748534} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -421,7 +472,7 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - {fileID: 1162486262} - - {fileID: 2101175959} + - {fileID: 841774913} - {fileID: 981190536} m_Father: {fileID: 493959136} m_RootOrder: 1 @@ -524,11 +575,11 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 1041748534} - m_RootOrder: 1 + m_Father: {fileID: 841774913} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -538,6 +589,12 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 6675434456741144591} m_PrefabAsset: {fileID: 0} +--- !u!224 &3983645218197209946 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + m_PrefabInstance: {fileID: 7450963883985672151} + m_PrefabAsset: {fileID: 0} --- !u!224 &5111372793132720207 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 6887168216434345711, guid: 841ca4be8d96342da81473d244f04f57, @@ -991,6 +1048,130 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 6ebd5f76171ee4e0b8d96b2eae97c251, type: 3} +--- !u!1001 &7450963883985672151 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 981190536} + m_Modifications: + - target: {fileID: 5778087624961889420, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_Name + value: PanelNoAdsTip + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889420, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5778087624961889421, guid: 5fb017c7a4a304f338c156928a51c275, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5fb017c7a4a304f338c156928a51c275, type: 3} --- !u!224 &8174312654083100069 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 1549853549434864437, guid: 30cc95837c5a74b1ca4757bb85a4abfa, diff --git a/Assets/Scripts/UI/CustomControl/EndingCell.cs b/Assets/Scripts/UI/CustomControl/EndingCell.cs index c9db1b42..982f97b7 100644 --- a/Assets/Scripts/UI/CustomControl/EndingCell.cs +++ b/Assets/Scripts/UI/CustomControl/EndingCell.cs @@ -23,7 +23,7 @@ public class EndingCell : MonoBehaviour private void Awake() { UIUtils.BindBtn(mBtnTip, OnClickTip); - UIUtils.BindBtn(mBtnAdTip, OnClickAdTip); + UIUtils.BindBtn(mBtnAdTip, OnClickAdTip, AudioType.Click_Tip); } private void OnDisable() @@ -93,6 +93,9 @@ public class EndingCell : MonoBehaviour private void OnClickAdTip() { + UIManager.Instance.OpenUI(); + return; + PlayerData.Instance.AddEndingAdTip(mLevelID, mEndingID); mBtnTip.gameObject.SetActive(true); mBtnAdTip.gameObject.SetActive(false); diff --git a/Assets/Scripts/UI/CustomControl/LevelList/LevelCell.cs b/Assets/Scripts/UI/CustomControl/LevelList/LevelCell.cs index 442c6da4..3ec121de 100644 --- a/Assets/Scripts/UI/CustomControl/LevelList/LevelCell.cs +++ b/Assets/Scripts/UI/CustomControl/LevelList/LevelCell.cs @@ -16,6 +16,7 @@ public class LevelCell : MonoBehaviour [SerializeField] GameObject mGobDone; [SerializeField] GameObject mGobComplete; [SerializeField] Image mImgProgress; + [SerializeField] GameObject mGobCurrent; [SerializeField] GameObject mGobEmpty; [SerializeField] Button mBtnComingSoon; @@ -57,6 +58,11 @@ public class LevelCell : MonoBehaviour mBtnComingSoon.gameObject.SetActive(false); } + public void ShowCurrent(bool pShow) + { + mGobCurrent.SetActive(pShow); + } + public void SetEmpty() { mBtnBg.gameObject.SetActive(false); diff --git a/Assets/Scripts/UI/CustomControl/LevelList/LevelPage.cs b/Assets/Scripts/UI/CustomControl/LevelList/LevelPage.cs index 7654cbd7..58bbf924 100644 --- a/Assets/Scripts/UI/CustomControl/LevelList/LevelPage.cs +++ b/Assets/Scripts/UI/CustomControl/LevelList/LevelPage.cs @@ -10,6 +10,8 @@ public class LevelPage : PageView [SerializeField] GameObject mGobLeftArrow; [SerializeField] GameObject mGobRightArrow; + private int mCurrentIndex = -1; + protected override void AwakeInit() { OnScrollPage = PlayScrollPage; @@ -18,15 +20,20 @@ public class LevelPage : PageView OnPageChanged = PageChanged; } + protected override void BeforeLoad() + { + mCurrentIndex = PlayerData.Instance.CurrentLevel - 1; + } + public override int Count { get { int tTotalCount = GameConfig.Instance.LevelSort.Count + 1;//add coming soon int tUnlockedCount = PlayerData.Instance.UnlockedLevel; - int tEnoughCount = (tUnlockedCount / CountPerPage + 1) + (tUnlockedCount % CountPerPage == 0 ? -1 : 0); + int tEnoughCount = ((tUnlockedCount - 1) / CountPerPage + 1) * CountPerPage; - return Mathf.Min(tTotalCount, tEnoughCount * CountPerPage); + return Mathf.Min(tTotalCount, tEnoughCount); } } @@ -37,6 +44,7 @@ public class LevelPage : PageView if (pIndex < PlayerData.Instance.UnlockedLevel) { tCell.Init(pIndex); + tCell.ShowCurrent(pIndex == mCurrentIndex); tCell.DelClick = OnClickLevel; } else @@ -54,6 +62,14 @@ public class LevelPage : PageView private void OnClickLevel(int pLevelIndex) { + if (mCurrentIndex >= 0) + { + mCellList[mCurrentIndex].GetComponent().ShowCurrent(false); + } + + mCurrentIndex = pLevelIndex; + mCellList[mCurrentIndex].GetComponent().ShowCurrent(true); + DelClickLevel?.Invoke(pLevelIndex); } diff --git a/Assets/Scripts/UI/CustomControl/PageView.cs b/Assets/Scripts/UI/CustomControl/PageView.cs index 083b57c9..6191015b 100644 --- a/Assets/Scripts/UI/CustomControl/PageView.cs +++ b/Assets/Scripts/UI/CustomControl/PageView.cs @@ -147,11 +147,14 @@ public abstract class PageView : MonoBehaviour, IBeginDragHandler, IEndDragHandl private int mPageCount; protected abstract void AwakeInit(); + protected abstract void BeforeLoad(); protected abstract void ConfigCell(GameObject pCellGob, int pIndex); public void LoadData() { + BeforeLoad(); + mPageCount = Count / CountPerPage + ((Count % CountPerPage) > 0 ? 1 : 0); int tSplitCount = Mathf.Max(1, mPageCount); diff --git a/Assets/Scripts/UI/PanelLevel.cs b/Assets/Scripts/UI/PanelLevel.cs index 1ef7f304..4fc3d7d3 100644 --- a/Assets/Scripts/UI/PanelLevel.cs +++ b/Assets/Scripts/UI/PanelLevel.cs @@ -24,6 +24,7 @@ public class PanelLevel : BasePanel base.OnOpen(); mLvPage.LoadData(); + mLvPage.PageTo((PlayerData.Instance.CurrentLevel - 1) / mLvPage.CountPerPage, false); } public override void OnClose() diff --git a/Assets/Scripts/UI/PanelNoAdsTip.cs b/Assets/Scripts/UI/PanelNoAdsTip.cs new file mode 100644 index 00000000..f5afb449 --- /dev/null +++ b/Assets/Scripts/UI/PanelNoAdsTip.cs @@ -0,0 +1,42 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using DG.Tweening; + +public class PanelNoAdsTip : BasePanel +{ + [SerializeField] CanvasGroup mCvsBg; + [SerializeField] RectTransform mRctBg; + + [SerializeField] Button mBtnMask; + + private void Awake() + { + UIUtils.BindBtn(mBtnMask, OnClickMask); + } + + public override void OnOpen() + { + base.OnOpen(); + + mCvsBg.alpha = 0; + mRctBg.anchoredPosition = new Vector2(0, -160); + + mCvsBg.DOFade(1, 0.3f); + mRctBg.DOAnchorPosY(100, 0.3f); + } + + public override void OnClose() + { + base.OnClose(); + + AudioManager.Instance.PlaySound(AudioType.UIClose); + } + + private void OnClickMask() + { + mCvsBg.DOFade(0, 0.3f); + mRctBg.DOAnchorPosY(-160, 0.3f).onComplete = Close; + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/PanelNoAdsTip.cs.meta b/Assets/Scripts/UI/PanelNoAdsTip.cs.meta new file mode 100644 index 00000000..565ba3f6 --- /dev/null +++ b/Assets/Scripts/UI/PanelNoAdsTip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 108afb2cf48604914a9e62440d34b7d2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: