From 2f74f260b7962a9205434191b8300d9dfcd65b94 Mon Sep 17 00:00:00 2001 From: richarjiang Date: Fri, 10 Apr 2026 23:08:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=85=B3=E5=8D=A1?= =?UTF-8?q?=EF=BC=9B=E6=94=AF=E6=8C=81=E5=8A=A0=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/prefabs/PageLevel.prefab | 1700 +++++++++-------- assets/prefabs/PageLevel.ts | 136 +- assets/resources/images/level/BuyButtonBg.png | Bin 0 -> 2138 bytes .../images/level/BuyButtonBg.png.meta | 134 ++ assets/resources/images/level/GetButtonBg.png | Bin 0 -> 2199 bytes .../images/level/GetButtonBg.png.meta | 134 ++ 6 files changed, 1233 insertions(+), 871 deletions(-) create mode 100644 assets/resources/images/level/BuyButtonBg.png create mode 100644 assets/resources/images/level/BuyButtonBg.png.meta create mode 100644 assets/resources/images/level/GetButtonBg.png create mode 100644 assets/resources/images/level/GetButtonBg.png.meta diff --git a/assets/prefabs/PageLevel.prefab b/assets/prefabs/PageLevel.prefab index 98dd429..e009871 100644 --- a/assets/prefabs/PageLevel.prefab +++ b/assets/prefabs/PageLevel.prefab @@ -37,26 +37,32 @@ "__id__": 102 }, { - "__id__": 228 + "__id__": 200 + }, + { + "__id__": 226 + }, + { + "__id__": 242 } ], "_active": true, "_components": [ - { - "__id__": 254 - }, - { - "__id__": 256 - }, { "__id__": 258 }, { "__id__": 260 + }, + { + "__id__": 262 + }, + { + "__id__": 264 } ], "_prefab": { - "__id__": 262 + "__id__": 266 }, "_lpos": { "__type__": "cc.Vec3", @@ -278,7 +284,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 312.19900000000007, + "y": 350.58000000000004, "z": 0 }, "_lrot": { @@ -1266,7 +1272,7 @@ "_target": null, "_left": 0, "_right": 0, - "_top": 267.80099999999993, + "_top": 229.41999999999996, "_bottom": 0, "_horizontalCenter": 0, "_verticalCenter": 0, @@ -2453,33 +2459,27 @@ }, { "__id__": 163 - }, - { - "__id__": 193 - }, - { - "__id__": 207 } ], "_active": true, "_components": [ { - "__id__": 221 + "__id__": 193 }, { - "__id__": 223 + "__id__": 195 }, { - "__id__": 225 + "__id__": 197 } ], "_prefab": { - "__id__": 227 + "__id__": 199 }, "_lpos": { "__type__": "cc.Vec3", - "x": 0, - "y": -720.984, + "x": -117.886, + "y": -586.649, "z": 0 }, "_lrot": { @@ -2491,9 +2491,9 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 + "x": 0.828, + "y": 0.828, + "z": 0.828 }, "_mobility": 0, "_layer": 1073741824, @@ -2648,7 +2648,7 @@ "node": { "__id__": 104 }, - "_enabled": true, + "_enabled": false, "__prefab": { "__id__": 108 }, @@ -3244,7 +3244,7 @@ "__id__": 140 } ], - "_active": false, + "_active": true, "_components": [ { "__id__": 158 @@ -3259,7 +3259,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 170, + "y": 0, "z": 0 }, "_lrot": { @@ -3294,7 +3294,7 @@ "__id__": 133 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 135 @@ -3501,7 +3501,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -304, + "x": -300.5, "y": 0, "z": 0 }, @@ -3637,7 +3637,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -151.3203125, + "x": -84.3203125, "y": 0, "z": 0 }, @@ -3678,7 +3678,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 153.359375, + "width": 273.359375, "height": 50.4 }, "_anchorPoint": { @@ -3714,7 +3714,7 @@ "b": 18, "a": 255 }, - "_string": "提示 1:", + "_string": "提示 2:待解锁", "_horizontalAlign": 1, "_verticalAlign": 1, "_actualFontSize": 40, @@ -3967,7 +3967,7 @@ "__id__": 170 } ], - "_active": false, + "_active": true, "_components": [ { "__id__": 188 @@ -3982,7 +3982,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 85, + "y": -170, "z": 0 }, "_lrot": { @@ -4017,7 +4017,7 @@ "__id__": 163 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 165 @@ -4224,7 +4224,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -304, + "x": -300.5, "y": 0, "z": 0 }, @@ -4360,7 +4360,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -151.3203125, + "x": -84.3203125, "y": 0, "z": 0 }, @@ -4401,7 +4401,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 153.359375, + "width": 273.359375, "height": 50.4 }, "_anchorPoint": { @@ -4437,7 +4437,7 @@ "b": 18, "a": 255 }, - "_string": "提示 1:", + "_string": "提示 3:待解锁", "_horizontalAlign": 1, "_verticalAlign": 1, "_actualFontSize": 40, @@ -4674,734 +4674,18 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, - { - "__type__": "cc.Node", - "_name": "UnLockItem2", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 102 - }, - "_children": [ - { - "__id__": 194 - } - ], - "_active": true, - "_components": [ - { - "__id__": 200 - }, - { - "__id__": 202 - }, - { - "__id__": 204 - } - ], - "_prefab": { - "__id__": 206 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.Node", - "_name": "Label", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 193 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 195 - }, - { - "__id__": 197 - } - ], - "_prefab": { - "__id__": 199 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, { "__type__": "cc.UITransform", "_name": "", "_objFlags": 0, "__editorExtras__": {}, "node": { + "__id__": 102 + }, + "_enabled": true, + "__prefab": { "__id__": 194 }, - "_enabled": true, - "__prefab": { - "__id__": 196 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 622.24609375, - "height": 50.4 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "837rfS85RP7JRrpvxxVoWG" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 194 - }, - "_enabled": true, - "__prefab": { - "__id__": 198 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_string": "活到老学到老,查看提示(1积分)", - "_horizontalAlign": 1, - "_verticalAlign": 1, - "_actualFontSize": 40, - "_fontSize": 40, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 0, - "_enableWrapText": true, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "4eupQ6PzlNFqghqw7jhLz0" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "aa2q2fNsFLyJAy+yUfNg9E", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 193 - }, - "_enabled": true, - "__prefab": { - "__id__": 201 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 800, - "height": 150 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "50lJhRO+NLhYtQ2EojwiUR" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 193 - }, - "_enabled": true, - "__prefab": { - "__id__": 203 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 249, - "g": 115, - "b": 22, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 0, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "c1a/Isg1VGQ6xWvrnhdx3w" - }, - { - "__type__": "cc.Button", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 193 - }, - "_enabled": true, - "__prefab": { - "__id__": 205 - }, - "clickEvents": [], - "_interactable": true, - "_transition": 3, - "_normalColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_hoverColor": { - "__type__": "cc.Color", - "r": 211, - "g": 211, - "b": 211, - "a": 255 - }, - "_pressedColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_disabledColor": { - "__type__": "cc.Color", - "r": 124, - "g": 124, - "b": 124, - "a": 255 - }, - "_normalSprite": null, - "_hoverSprite": null, - "_pressedSprite": null, - "_disabledSprite": null, - "_duration": 0.1, - "_zoomScale": 1.2, - "_target": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "99V20CyRNF4JTNghn/JEBe" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "1edFlu2VNE+bXizpz/KBAd", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "UnLockItem3", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 102 - }, - "_children": [ - { - "__id__": 208 - } - ], - "_active": true, - "_components": [ - { - "__id__": 214 - }, - { - "__id__": 216 - }, - { - "__id__": 218 - } - ], - "_prefab": { - "__id__": 220 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": -170, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.Node", - "_name": "Label", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 207 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 209 - }, - { - "__id__": 211 - } - ], - "_prefab": { - "__id__": 213 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 208 - }, - "_enabled": true, - "__prefab": { - "__id__": 210 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 564.4921875, - "height": 50.4 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "6dIWTHNFNFZbQX/JBW3w4n" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 208 - }, - "_enabled": true, - "__prefab": { - "__id__": 212 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_string": "服了服了,查看提示3(1积分)", - "_horizontalAlign": 1, - "_verticalAlign": 1, - "_actualFontSize": 40, - "_fontSize": 40, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 0, - "_enableWrapText": true, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "e7SairIslIlp/LdbIvl9ti" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "e5mRGsF/VDUaqG0kQL0psp", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 207 - }, - "_enabled": true, - "__prefab": { - "__id__": 215 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 800, - "height": 150 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "35ZKRI0EFAU49AiSY7eKmU" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 207 - }, - "_enabled": true, - "__prefab": { - "__id__": 217 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 249, - "g": 115, - "b": 22, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 0, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "a1aw4vUUdOebK8xzajmMy4" - }, - { - "__type__": "cc.Button", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 207 - }, - "_enabled": true, - "__prefab": { - "__id__": 219 - }, - "clickEvents": [], - "_interactable": true, - "_transition": 3, - "_normalColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_hoverColor": { - "__type__": "cc.Color", - "r": 211, - "g": 211, - "b": 211, - "a": 255 - }, - "_pressedColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_disabledColor": { - "__type__": "cc.Color", - "r": 124, - "g": 124, - "b": 124, - "a": 255 - }, - "_normalSprite": null, - "_hoverSprite": null, - "_pressedSprite": null, - "_disabledSprite": null, - "_duration": 0.1, - "_zoomScale": 1.2, - "_target": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "fevEeArRxDHYhG18s5h7zV" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "b8/1GJy3VPBo9VuS5yN9r4", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 102 - }, - "_enabled": true, - "__prefab": { - "__id__": 222 - }, "_contentSize": { "__type__": "cc.Size", "width": 800, @@ -5428,7 +4712,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 224 + "__id__": 196 }, "_resizeMode": 1, "_layoutType": 2, @@ -5466,14 +4750,14 @@ }, "_enabled": true, "__prefab": { - "__id__": 226 + "__id__": 198 }, "_alignFlags": 4, "_target": null, "_left": 0, "_right": 0, "_top": 0, - "_bottom": 114.01599999999996, + "_bottom": 290.491, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, @@ -5515,29 +4799,29 @@ }, "_children": [ { - "__id__": 229 + "__id__": 201 }, { - "__id__": 235 + "__id__": 207 }, { - "__id__": 241 + "__id__": 213 } ], "_active": true, "_components": [ { - "__id__": 247 + "__id__": 219 }, { - "__id__": 249 + "__id__": 221 }, { - "__id__": 251 + "__id__": 223 } ], "_prefab": { - "__id__": 253 + "__id__": 225 }, "_lpos": { "__type__": "cc.Vec3", @@ -5574,20 +4858,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 228 + "__id__": 200 }, "_children": [], "_active": false, "_components": [ { - "__id__": 230 + "__id__": 202 }, { - "__id__": 232 + "__id__": 204 } ], "_prefab": { - "__id__": 234 + "__id__": 206 }, "_lpos": { "__type__": "cc.Vec3", @@ -5624,11 +4908,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 229 + "__id__": 201 }, "_enabled": true, "__prefab": { - "__id__": 231 + "__id__": 203 }, "_contentSize": { "__type__": "cc.Size", @@ -5652,11 +4936,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 229 + "__id__": 201 }, "_enabled": true, "__prefab": { - "__id__": 233 + "__id__": 205 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5733,20 +5017,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 228 + "__id__": 200 }, "_children": [], "_active": true, "_components": [ { - "__id__": 236 + "__id__": 208 }, { - "__id__": 238 + "__id__": 210 } ], "_prefab": { - "__id__": 240 + "__id__": 212 }, "_lpos": { "__type__": "cc.Vec3", @@ -5783,11 +5067,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 235 + "__id__": 207 }, "_enabled": true, "__prefab": { - "__id__": 237 + "__id__": 209 }, "_contentSize": { "__type__": "cc.Size", @@ -5811,11 +5095,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 235 + "__id__": 207 }, "_enabled": true, "__prefab": { - "__id__": 239 + "__id__": 211 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5892,20 +5176,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 228 + "__id__": 200 }, "_children": [], "_active": true, "_components": [ { - "__id__": 242 + "__id__": 214 }, { - "__id__": 244 + "__id__": 216 } ], "_prefab": { - "__id__": 246 + "__id__": 218 }, "_lpos": { "__type__": "cc.Vec3", @@ -5942,11 +5226,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 241 + "__id__": 213 }, "_enabled": true, "__prefab": { - "__id__": 243 + "__id__": 215 }, "_contentSize": { "__type__": "cc.Size", @@ -5970,11 +5254,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 241 + "__id__": 213 }, "_enabled": true, "__prefab": { - "__id__": 245 + "__id__": 217 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -6028,11 +5312,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 228 + "__id__": 200 }, "_enabled": true, "__prefab": { - "__id__": 248 + "__id__": 220 }, "_contentSize": { "__type__": "cc.Size", @@ -6056,11 +5340,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 228 + "__id__": 200 }, "_enabled": true, "__prefab": { - "__id__": 250 + "__id__": 222 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -6098,21 +5382,21 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 228 + "__id__": 200 }, "_enabled": true, "__prefab": { - "__id__": 252 + "__id__": 224 }, "editingDidBegan": [], "textChanged": [], "editingDidEnded": [], "editingReturn": [], "_textLabel": { - "__id__": 232 + "__id__": 204 }, "_placeholderLabel": { - "__id__": 238 + "__id__": 210 }, "_returnType": 0, "_string": "", @@ -6140,6 +5424,800 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, + { + "__type__": "cc.Node", + "_name": "UnLockTipsBtn", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 227 + } + ], + "_active": true, + "_components": [ + { + "__id__": 233 + }, + { + "__id__": 235 + }, + { + "__id__": 237 + }, + { + "__id__": 239 + } + ], + "_prefab": { + "__id__": 241 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -278.534, + "y": -948.056, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 226 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 228 + }, + { + "__id__": 230 + } + ], + "_prefab": { + "__id__": 232 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 5.26, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 227 + }, + "_enabled": true, + "__prefab": { + "__id__": 229 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5a3611cA1PLoBUnUN6wHnM" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 227 + }, + "_enabled": true, + "__prefab": { + "__id__": 231 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "查看提示", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 40, + "_fontSize": 40, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3aLcWpYYBJ66jJ03QeXFp3" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "feiQZ/+nhMJ7RjCbNDhbvc", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 226 + }, + "_enabled": true, + "__prefab": { + "__id__": 234 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 326, + "height": 143 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "25u53mLNlGS7bTSEzDyteU" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 226 + }, + "_enabled": true, + "__prefab": { + "__id__": 236 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f7f6c133-9b56-4ed6-9a53-6d71252990c3@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "37FbJPAVFC+ot4qpYxd035" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 226 + }, + "_enabled": true, + "__prefab": { + "__id__": 238 + }, + "_alignFlags": 12, + "_target": null, + "_left": 98.46600000000001, + "_right": 0, + "_top": 0, + "_bottom": 60.44399999999996, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "766MZ7jXdJKoKH+E5Kc62x" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 226 + }, + "_enabled": true, + "__prefab": { + "__id__": 240 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 0, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": null, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9b+FnwcqFDQ5goevPZZpqH" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "19eSiMh85GHYe+w2nTu4QD", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "AddTimeBtn", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 243 + } + ], + "_active": true, + "_components": [ + { + "__id__": 249 + }, + { + "__id__": 251 + }, + { + "__id__": 253 + }, + { + "__id__": 255 + } + ], + "_prefab": { + "__id__": 257 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 284.256, + "y": -948.056, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 242 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 244 + }, + { + "__id__": 246 + } + ], + "_prefab": { + "__id__": 248 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 5.26, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 243 + }, + "_enabled": true, + "__prefab": { + "__id__": 245 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 186.71875, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "dfjU34pi9IhJzkg0mO04lf" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 243 + }, + "_enabled": true, + "__prefab": { + "__id__": 247 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "加时 60 秒", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 40, + "_fontSize": 40, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c9R3jj/J1DqZmkt61mM1f9" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "00J+oLLyZBeIHVNsyLY3IR", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 242 + }, + "_enabled": true, + "__prefab": { + "__id__": 250 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 326, + "height": 143 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8bUVbMNN1FL6j3KeaY7NAA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 242 + }, + "_enabled": true, + "__prefab": { + "__id__": 252 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f7f6c133-9b56-4ed6-9a53-6d71252990c3@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "fbBsOMOrZKcrapTZqdrzhs" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 242 + }, + "_enabled": true, + "__prefab": { + "__id__": 254 + }, + "_alignFlags": 36, + "_target": null, + "_left": 0, + "_right": 92.74400000000003, + "_top": 0, + "_bottom": 60.44399999999996, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "21ZCyeWIFN55z/ik/cNfWj" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 242 + }, + "_enabled": true, + "__prefab": { + "__id__": 256 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 0, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": null, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "92jIhtYslAl4a7Wek9tP8o" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "88uIAfflpMrbwtlnLK/RW/", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -6150,7 +6228,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 255 + "__id__": 259 }, "_contentSize": { "__type__": "cc.Size", @@ -6178,7 +6256,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 257 + "__id__": 261 }, "_alignFlags": 0, "_target": null, @@ -6214,7 +6292,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 259 + "__id__": 263 }, "inputLayout": { "__id__": 24 @@ -6223,7 +6301,7 @@ "__id__": 30 }, "inputTemplate": { - "__id__": 228 + "__id__": 200 }, "actionNode": { "__id__": 17 @@ -6246,11 +6324,11 @@ "tipsItem3": { "__id__": 163 }, - "unLockItem2": { - "__id__": 193 + "unLockTipsBtn": { + "__id__": 226 }, - "unLockItem3": { - "__id__": 207 + "addTimeBtn": { + "__id__": 242 }, "clockLabel": { "__id__": 94 @@ -6291,7 +6369,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 261 + "__id__": 265 }, "_clip": null, "_loop": false, diff --git a/assets/prefabs/PageLevel.ts b/assets/prefabs/PageLevel.ts index 9d65b5c..4ecceae 100644 --- a/assets/prefabs/PageLevel.ts +++ b/assets/prefabs/PageLevel.ts @@ -53,10 +53,10 @@ export class PageLevel extends BaseView { tipsItem3: Node | null = null; @property(Node) - unLockItem2: Node | null = null; + unLockTipsBtn: Node | null = null; @property(Node) - unLockItem3: Node | null = null; + addTimeBtn: Node | null = null; @property(Label) clockLabel: Label | null = null; @@ -91,6 +91,9 @@ export class PageLevel extends BaseView { /** 倒计时剩余秒数 */ private _countdown: number = 60; + /** 关卡开始时间戳(ms),用于准确计算耗时 */ + private _levelStartTime: number = 0; + /** 倒计时是否结束 */ private _isTimeUp: boolean = false; @@ -103,6 +106,9 @@ export class PageLevel extends BaseView { /** 是否正在解锁提示(防止双击重复触发) */ private _isUnlocking: boolean = false; + /** 下一个待解锁的线索序号(2 或 3),超过 3 表示全部已解锁 */ + private _nextClueIndex: number = 2; + /** 通关弹窗实例 */ private _passModalNode: Node | null = null; @@ -170,8 +176,8 @@ export class PageLevel extends BaseView { // 清理事件监听 this.iconSetting?.off(Node.EventType.TOUCH_END, this.onIconSettingClick, this); - this.unLockItem2?.off(Node.EventType.TOUCH_END); - this.unLockItem3?.off(Node.EventType.TOUCH_END); + this.unLockTipsBtn?.off(Node.EventType.TOUCH_END); + this.addTimeBtn?.off(Node.EventType.TOUCH_END); this.submitButton?.off(Node.EventType.TOUCH_END, this.onSubmitAnswer, this); } @@ -270,13 +276,15 @@ export class PageLevel extends BaseView { this.setClue(1, config.clue1); } - // 隐藏线索2、3 - this.hideClue(2); - this.hideClue(3); + // 重置线索解锁进度 + this._nextClueIndex = 2; - // 显示解锁按钮2、3 - this.showUnlockButton(2); - this.showUnlockButton(3); + // 线索2、3 保持显示,写入"待解锁"占位文案 + this.setClue(2, '待解锁'); + this.setClue(3, '待解锁'); + + // 显示解锁按钮(单个统一按钮) + this.showUnlockButton(); // 根据答案长度创建单个输入框 if (config.answer) { @@ -513,22 +521,20 @@ export class PageLevel extends BaseView { /** * 显示解锁按钮 */ - private showUnlockButton(index: number): void { - const unlockItem = index === 2 ? this.unLockItem2 : this.unLockItem3; - if (unlockItem) { - unlockItem.active = true; - console.log(`[PageLevel] 显示解锁按钮${index}`); + private showUnlockButton(_index?: number): void { + if (this.unLockTipsBtn) { + this.unLockTipsBtn.active = true; + console.log('[PageLevel] 显示解锁按钮'); } } /** * 隐藏解锁按钮 */ - private hideUnlockButton(index: number): void { - const unlockItem = index === 2 ? this.unLockItem2 : this.unLockItem3; - if (unlockItem) { - unlockItem.active = false; - console.log(`[PageLevel] 隐藏解锁按钮${index}`); + private hideUnlockButton(_index?: number): void { + if (this.unLockTipsBtn) { + this.unLockTipsBtn.active = false; + console.log('[PageLevel] 隐藏解锁按钮'); } } @@ -536,14 +542,12 @@ export class PageLevel extends BaseView { * 初始化解锁按钮事件 */ private initUnlockButtons(): void { - // 解锁按钮2 - if (this.unLockItem2) { - this.unLockItem2.on(Node.EventType.TOUCH_END, () => this.onUnlockClue(2), this); + if (this.unLockTipsBtn) { + this.unLockTipsBtn.on(Node.EventType.TOUCH_END, this.onUnlockClue, this); } - // 解锁按钮3 - if (this.unLockItem3) { - this.unLockItem3.on(Node.EventType.TOUCH_END, () => this.onUnlockClue(3), this); + if (this.addTimeBtn) { + this.addTimeBtn.on(Node.EventType.TOUCH_END, this.onAddTime, this); } console.log('[PageLevel] 解锁按钮事件已绑定'); @@ -563,41 +567,52 @@ export class PageLevel extends BaseView { } /** - * 点击解锁线索(观看激励视频广告后解锁) + * 点击解锁线索(顺序解锁:先线索2,再线索3;全部解锁后提示已解锁完毕) */ - private async onUnlockClue(index: number): Promise { - // 防止双击重复触发 - if (this._isUnlocking) return; - - this._isUnlocking = true; - - try { - // 检查线索是否存在 - if (!this._currentConfig) return; - - const clueContent = index === 2 ? this._currentConfig.clue2 : this._currentConfig.clue3; - if (!clueContent) { - ToastManager.show('该提示暂未配置'); - return; - } - - // 调用微信激励视频广告 - ToastManager.show('观看视频即可解锁提示'); - const adWatched = await WxSDK.showRewardedVideoAd(); - if (!adWatched) { - ToastManager.show('需要看完视频才能解锁提示哦'); - return; - } - - this.playClickSound(); - this.hideUnlockButton(index); - this.showClue(index); - this.setClue(index, clueContent); - - console.log(`[PageLevel] 通过观看广告解锁线索${index}`); - } finally { - this._isUnlocking = false; + private onUnlockClue(): void { + // 全部已解锁,提示用户 + if (this._nextClueIndex > 3) { + ToastManager.show('已解锁完毕'); + return; } + + if (!this._currentConfig) return; + + const index = this._nextClueIndex; + const clueContent = index === 2 ? this._currentConfig.clue2 : this._currentConfig.clue3; + if (!clueContent) { + ToastManager.show('该提示暂未配置'); + return; + } + + this.playClickSound(); + this.setClue(index, clueContent); + + // 推进到下一条待解锁线索 + this._nextClueIndex++; + + // 全部解锁完毕则隐藏按钮 + if (this._nextClueIndex > 3) { + this.hideUnlockButton(); + } + + console.log(`[PageLevel] 解锁线索${index}`); + } + + /** + * 点击增加时间按钮(倒计时增加 60 秒) + */ + private onAddTime(): void { + if (this._isTimeUp) { + ToastManager.show('时间已结束,无法增加'); + return; + } + + this._countdown += 60; + this.updateClockLabel(); + this.playClickSound(); + ToastManager.show('已成功增加60秒!'); + console.log(`[PageLevel] 增加60秒倒计时,当前剩余: ${this._countdown}s`); } // ========== 主图相关方法 ========== @@ -655,6 +670,7 @@ export class PageLevel extends BaseView { private startCountdown(): void { this._countdown = 60; this._isTimeUp = false; + this._levelStartTime = Date.now(); this.updateClockLabel(); this.schedule(this.onCountdownTick, 1); console.log('[PageLevel] 开始倒计时 60 秒'); @@ -804,7 +820,7 @@ export class PageLevel extends BaseView { this.playSuccessSound(); const levelId = this._currentConfig?.id ?? ''; - const timeSpent = 60 - this._countdown; + const timeSpent = Math.max(0, Math.round((Date.now() - this._levelStartTime) / 1000)); if (!this._isShareMode) { // 上报通关耗时 diff --git a/assets/resources/images/level/BuyButtonBg.png b/assets/resources/images/level/BuyButtonBg.png new file mode 100644 index 0000000000000000000000000000000000000000..6f35f31bcc0feadb13bc053e8369a685cf825591 GIT binary patch literal 2138 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 Z{0lL+I~%@G*GT{X002ovPDHLkV1mwYEgS#< literal 0 HcmV?d00001 diff --git a/assets/resources/images/level/GetButtonBg.png.meta b/assets/resources/images/level/GetButtonBg.png.meta new file mode 100644 index 0000000..296dc06 --- /dev/null +++ b/assets/resources/images/level/GetButtonBg.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.27", + "importer": "image", + "imported": true, + "uuid": "f7f6c133-9b56-4ed6-9a53-6d71252990c3", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "f7f6c133-9b56-4ed6-9a53-6d71252990c3@6c48a", + "displayName": "GetButtonBg", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "f7f6c133-9b56-4ed6-9a53-6d71252990c3", + "isUuid": true, + "visible": false, + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "f7f6c133-9b56-4ed6-9a53-6d71252990c3@f9941", + "displayName": "GetButtonBg", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 326, + "height": 143, + "rawWidth": 326, + "rawHeight": 143, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -163, + -71.5, + 0, + 163, + -71.5, + 0, + -163, + 71.5, + 0, + 163, + 71.5, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 143, + 326, + 143, + 0, + 0, + 326, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -163, + -71.5, + 0 + ], + "maxPos": [ + 163, + 71.5, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "f7f6c133-9b56-4ed6-9a53-6d71252990c3@6c48a", + "atlasUuid": "", + "trimType": "auto" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": false, + "hasAlpha": true, + "redirect": "f7f6c133-9b56-4ed6-9a53-6d71252990c3@6c48a" + } +}