feat: 还原首页 UI

This commit is contained in:
richarjiang
2026-05-03 21:57:18 +08:00
parent 3d246de24c
commit 0127013bae
14 changed files with 2205 additions and 608 deletions

126
AGENTS.md
View File

@@ -19,84 +19,62 @@ Git 历史采用 Conventional Commits且摘要多为中文例如 `feat:
<claude-mem-context> <claude-mem-context>
# Memory Context # Memory Context
# [mp-xieyingeng] recent context, 2026-04-29 6:32pm GMT+8 # $CMEM mp-xieyingeng 2026-05-01 10:06am GMT+8
Legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖decision 🚨security_alert 🔐security_note Legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖decision
Format: ID TIME TYPE TITLE Format: ID TIME TYPE TITLE
Fetch details: get_observations([IDs]) | Search: mem-search skill Fetch details: get_observations([IDs]) | Search: mem-search skill
Stats: 50 obs (9,755t read) | 1,857,754t work | 99% savings Stats: 47 obs (10,663t read) | 538,681t work | 98% savings
### Apr 26, 2026 ### Apr 24, 2026
1330 4:45p 🔄 API Protocol Upgrade - NextLevel-Driven Architecture 101 8:46a 🟣 Live label display format updated to X/Y format
1331 " ✅ ApiTypes.ts type definitions updated 114 6:40p 🟣 Dynamic Input Layout Initialization in PageLevel Prefab
1332 " ✅ Task 4 completed: ApiTypes.ts type definitions updated 115 6:41p 🟣 Dynamic Punch Block Layout for PageLevel.prefab
1333 4:46p ✅ Tasks 4 and 5 completed: type definitions migrated 116 " 🔵 Layout Component Configuration for Input and Punch Blocks
1334 5:10p 🔵 进度条小百分比时圆角畸形问题 119 6:42p 🟣 Dynamic Input Blocks and Punch Layout System Implemented
1335 " 🔵 进度条圆角畸形问题调查中 121 " 🟣 PageLevel Prefab Updated with punchLayout Property
1336 " 🔵 通关弹窗进度条使用 Cocos ProgressBar 组件 122 " 🔄 Cleanup After Dynamic Block Refactoring
1337 5:11p 🔵 进度条圆角畸形调查中 - Prefab 结构检查 124 " ✅ TypeScript Compilation Check in Progress
1338 " 🔵 ProgressBar 系统架构已定位 126 6:43p ✅ TypeScript Compilation Check Extended
1340 " 🔵 找到进度条圆角畸形根本原因 127 " 🔄 Complete Diff of PageLevel.ts Dynamic Block System
1341 5:12p 🔵 进度条小百分比时圆角变形问题定位 128 " 🔵 PageLevel.prefab Changes Not Persisted
1339 " 🔵 发现 RoundedRectMask 工具组件 129 6:44p 🟣 PageLevel Prefab Correctly Updated with punchLayout
S1309 移除 PageLevel.ts 进入关卡时弹出体力扣减 toast (Apr 26 at 5:16 PM) 130 " ✅ TypeScript Compilation Blocked - Permission Required
1342 5:16p 🔵 PassModal 进度值规范化逻辑 133 6:45p 🔄 Extracted getPunchBlockLabel Helper Method
1343 5:17p 🔴 进度条圆角畸形问题已修复 134 " 🔄 Template Node Hiding Logic Improved
1344 " ⚖️ 探索使用 Mask 裁剪替代最小进度值方案 136 6:48p ⚖️ TypeScript diagnostics disabled, using IDE/linter instead
1345 " ⚖️ 否决 Mask 方案,确认最小进度值方案最优 138 " 🔄 PageLevel 输入方式从单框改为逐字格子
### Apr 27, 2026 139 " 🔄 谐音梗展示从 Label 改为动态 Block 节点
1346 9:21a 🔴 移除进入游戏后的体力扣减 toast 提示 140 " ✅ PageLevel.prefab 布局位置微调
1347 " 🔴 移除进入游戏后的体力扣减 toast 提示 165 8:08p 🟣 PageLevel input layout simplified to single-character boxes with auto-distribution
1348 " 🟣 首页添加体力值显示功能 167 8:09p 🔵 PageLevel.ts input block structure and callback stubs discovered
S1308 移除进入游戏关卡时弹出体力扣减的 toast 提示 (Apr 27 at 9:21 AM) 168 " 🟣 Auto-distribute characters across input boxes and auto-submit on completion implemented
S1310 移除进入游戏体力扣减 toast 并在首页添加体力显示 (Apr 27 at 9:22 AM) 169 " 🔴 PageLevel.ts node cleanup now calls removeFromParent before destroy
S1311 移除体力扣减 toast 并完善首页体验 (Apr 27 at 9:23 AM) 170 8:10p 🔄 PageLevel.ts full diff: single EditBox replaced with per-character block system
1349 9:25a ✅ PageHome.ts 添加 ToastManager 导入 171 " 🔴 distributeInputText() wrapped in try/finally to guarantee flag reset
1350 " ✅ PK按钮点击改为提示"功能开发中" 179 8:23p ✅ Game011_3.ttf font relocated from resources/ to dedicated fonts/ bundle directory
S1313 Implement object-fit: cover image scaling in Cocos Creator to prevent downloaded images from being distorted (Apr 27 at 9:26 AM) 180 " 🟣 PageLoading.ts now loads fonts as a dynamic bundle after level data, before UI
1351 9:32a 🟣 Stamina animation system for level entry 181 " 🔄 AssetManager import switched to type-only import in PageLoading.ts
1352 " 🔵 Cocos Creator game project structure discovered 182 8:31p 🟣 PageLevel input UX improvement: full-string editing support
1354 " 🟣 StarGame 按钮点击动画需求 183 " 🟣 PageLevel input UX: full-string editing implemented
1356 " 🔵 体力系统架构发现 186 8:34p 🔴 PageLevel: clear input text on wrong answer
1353 9:33a 🔵 StaminaManager API confirmed for stamina operations 187 8:35p 🟣 PageLevel: delay pass modal to show punchline
1355 9:37a 🔵 项目结构和现有代码发现 189 8:36p 🔄 PageLevel: level completion reporting made fire-and-forget
1357 9:38a 🔵 EnterLevelData 结构分析 191 8:45p 🔴 PageLevel: punchline block cleanup improved
1359 9:39a 🟣 Stamina animation system implemented for game entry flow 192 8:46p 🟣 PageLevel.ts TitleLevel Label variable reserved
1358 9:41a ⚖️ 体力值飞行动画实现计划制定完成 193 8:47p 🔵 PageLevel.ts level number tracking mechanism discovered
1362 9:45a 🟣 Image Cover Mode Scaling in Cocos Creator 195 " 🟣 PageLevel.ts TitleLevel dynamic label update implemented
S1312 Fix image distortion in PageLevel.ts by implementing object-fit: cover behavior for downloaded images (Apr 27 at 9:45 AM) 196 8:53p 🔵 PageLevel punchline not updated from enterLevel API
1360 " ✅ Cocos Creator animation imports added to PageHome.ts 198 " 🔴 LevelDataManager updateLevelDetails now includes punchline
1361 " ✅ Animation constants added to PageHome class 199 " 🔴 PageLevel punchline flow and empty state layout fixed
1363 " ✅ Start game button integrated with stamina check and animation flow 200 8:54p 🔴 LevelDataManager preserves existing punchline when enter returns null
1364 " 🟣 Stamina consumption animation fully implemented in PageHome 203 9:06p 🟣 PageLevel.ts 新增图片描述标签绑定字段
S1314 Implement stamina consumption animation in Cocos Creator game - when clicking StarGame button, IconLive node flies to button with floating "-1" text, then navigates to level (Apr 27 at 9:45 AM) 205 9:07p 🟣 PageLevel.ts 图片描述标签字段对接完成
1365 9:46a 🔴 Animation completes but navigation to PageLevel fails 206 9:09p ✅ PageLevel.ts 回退图片描述标签字段命名
S1315 为 PageLevel.ts 的 mainImage 和 mainImage2 节点实现 CSS cover 模式图片缩放 (Apr 27 at 9:46 AM) 208 9:11p 🟣 LevelDataManager 增加图片描述字段存储
1366 9:50a 🔴 Cocos Creator tween chain broken by premature node destroy 214 9:40p 🟣 拼图游戏关卡内 Punch Layout 显隐控制
1367 9:55a 🔴 Navigation still failing after first tween chain fix - further debugging needed 216 " 🟣 PageLevel.ts punchline 显隐控制逻辑对接完成
1368 " 🔴 Decoupled fly animation from float text timing using setTimeout
1369 9:56a 🔴 Cocos Creator tween chain broken by any node state change mid-animation
1370 9:59a 🟣 CSS cover-style image scaling for PageLevel images
1371 10:01a ✅ PageLevel.ts imports extended for cover-style image scaling
1372 " 🟣 CSS cover-mode image scaling implemented for PageLevel images
S1316 Debug cover mode image overflow in PageLevel.ts - image exceeds container bounds despite Mask applied (Apr 27 at 10:02 AM)
1373 10:02a 🔴 Cover mode image overflows container bounds
1374 10:06a 🔵 GRAPHICS_RECT vs GRAPHICS_STENCIL for Mask in Cocos Creator
1375 10:08a 🔴 Mask.Type.RECT does not exist in Cocos Creator API
1376 " 🔵 MaskType enum found in Cocos Creator 3.8 engine declarations
1378 " 🔵 MaskType enum values confirmed - GRAPHICS_RECT exists
1377 10:09a 🔵 MaskType enum definition found at line 46015
1379 10:10a 🔴 Reverted Mask.Type to GRAPHICS_RECT
S1317 Implement CSS cover-mode image scaling for PageLevel.ts mainImage nodes (Apr 27 at 10:10 AM)
**Investigated**: Cover mode implementation in _applyCoverSprite() using Mask + scaled child node approach; Cocos Creator 3.8 MaskType enum investigation; root cause analysis of image overflow
**Learned**: Cocos Creator Mask only clips child nodes, NOT the container's own Sprite component; GRAPHICS_RECT = 0 is valid enum value in Cocos 3.8; container Sprite renders outside Mask bounds; solution: disable containerSprite and use child node for image display Access 539k tokens of past work via get_observations([IDs]) or mem-search skill.
**Completed**: _applyCoverSprite() method implemented with: Mask(GRAPHICS_RECT) on container, child node '_coverImg' with Sprite.SizeMode.RAW, cover scale calculation, containerSprite.enabled = false to prevent overflow
**Next Steps**: User to test in Cocos Creator editor to verify image clipping now works correctly
Access 1858k tokens of past work via get_observations([IDs]) or mem-search skill.
</claude-mem-context> </claude-mem-context>

View File

@@ -25,23 +25,26 @@
"__id__": 10 "__id__": 10
}, },
{ {
"__id__": 24 "__id__": 18
},
{
"__id__": 32
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 30 "__id__": 38
}, },
{ {
"__id__": 32 "__id__": 40
}, },
{ {
"__id__": 34 "__id__": 42
} }
], ],
"_prefab": { "_prefab": {
"__id__": 36 "__id__": 44
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -229,6 +232,179 @@
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{
"__type__": "cc.Node",
"_name": "logo",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 13
},
{
"__id__": 15
}
],
"_prefab": {
"__id__": 17
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 481.46299999999997,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.43,
"y": 0.43,
"z": 0.43
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1596,
"height": 626
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3cdcUkXd5PJZ4woQwOD16w"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "6cc690c9-5025-48e1-a533-3db4fa53b003@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": "cefBJgJ5lNpZJDFQk+GxVn"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 16
},
"_alignFlags": 1,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 463.947,
"_bottom": 0,
"_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": "b3U63ZzuZMq7EtMDG94oZV"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "bb6KXFQFdCfJWVQGevdCSb",
"nestedPrefabInstanceRoots": null
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "ProgressBar", "_name": "ProgressBar",
@@ -239,23 +415,23 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 11 "__id__": 19
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 17 "__id__": 25
}, },
{ {
"__id__": 19 "__id__": 27
}, },
{ {
"__id__": 21 "__id__": 29
} }
], ],
"_prefab": { "_prefab": {
"__id__": 23 "__id__": 31
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -292,20 +468,20 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 10 "__id__": 18
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 12 "__id__": 20
}, },
{ {
"__id__": 14 "__id__": 22
} }
], ],
"_prefab": { "_prefab": {
"__id__": 16 "__id__": 24
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -342,11 +518,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 11 "__id__": 19
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 13 "__id__": 21
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -370,11 +546,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 11 "__id__": 19
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 15 "__id__": 23
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@@ -428,11 +604,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 10 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 18 "__id__": 26
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -456,11 +632,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 10 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 20 "__id__": 28
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@@ -501,14 +677,14 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 10 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 22 "__id__": 30
}, },
"_barSprite": { "_barSprite": {
"__id__": 14 "__id__": 22
}, },
"_mode": 0, "_mode": 0,
"_totalLength": 300, "_totalLength": 300,
@@ -545,14 +721,14 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 25 "__id__": 33
}, },
{ {
"__id__": 27 "__id__": 35
} }
], ],
"_prefab": { "_prefab": {
"__id__": 29 "__id__": 37
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -589,11 +765,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 24 "__id__": 32
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 26 "__id__": 34
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -617,11 +793,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 24 "__id__": 32
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 28 "__id__": 36
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@@ -702,7 +878,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 31 "__id__": 39
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -730,13 +906,13 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 33 "__id__": 41
}, },
"progressBar": { "progressBar": {
"__id__": 21 "__id__": 29
}, },
"statusLabel": { "statusLabel": {
"__id__": 27 "__id__": 35
}, },
"_id": "" "_id": ""
}, },
@@ -754,7 +930,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 35 "__id__": 43
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,

View File

@@ -23,7 +23,7 @@
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 19 "__id__": 22
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -54,7 +54,7 @@
}, },
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_globals": { "_globals": {
"__id__": 20 "__id__": 23
}, },
"_id": "d60530e8-06be-4ac4-8613-9cc604c77f32" "_id": "d60530e8-06be-4ac4-8613-9cc604c77f32"
}, },
@@ -74,22 +74,22 @@
"__id__": 5 "__id__": 5
}, },
{ {
"__id__": 13 "__id__": 16
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 15
},
{
"__id__": 16
},
{
"__id__": 17
},
{ {
"__id__": 18 "__id__": 18
},
{
"__id__": 19
},
{
"__id__": 20
},
{
"__id__": 21
} }
], ],
"_prefab": null, "_prefab": null,
@@ -237,7 +237,6 @@
"instance": { "instance": {
"__id__": 7 "__id__": 7
}, },
"targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {
@@ -254,10 +253,10 @@
"__id__": 10 "__id__": 10
}, },
{ {
"__id__": 11 "__id__": 12
}, },
{ {
"__id__": 12 "__id__": 14
} }
], ],
"removedComponents": [] "removedComponents": []
@@ -281,7 +280,7 @@
{ {
"__type__": "CCPropertyOverrideInfo", "__type__": "CCPropertyOverrideInfo",
"targetInfo": { "targetInfo": {
"__id__": 9 "__id__": 11
}, },
"propertyPath": [ "propertyPath": [
"_lpos" "_lpos"
@@ -293,10 +292,16 @@
"z": 0 "z": 0
} }
}, },
{
"__type__": "cc.TargetInfo",
"localID": [
"c46/YsCPVOJYA4mWEpNYRx"
]
},
{ {
"__type__": "CCPropertyOverrideInfo", "__type__": "CCPropertyOverrideInfo",
"targetInfo": { "targetInfo": {
"__id__": 9 "__id__": 13
}, },
"propertyPath": [ "propertyPath": [
"_lrot" "_lrot"
@@ -309,10 +314,16 @@
"w": 1 "w": 1
} }
}, },
{
"__type__": "cc.TargetInfo",
"localID": [
"c46/YsCPVOJYA4mWEpNYRx"
]
},
{ {
"__type__": "CCPropertyOverrideInfo", "__type__": "CCPropertyOverrideInfo",
"targetInfo": { "targetInfo": {
"__id__": 9 "__id__": 15
}, },
"propertyPath": [ "propertyPath": [
"_euler" "_euler"
@@ -324,6 +335,12 @@
"z": 0 "z": 0
} }
}, },
{
"__type__": "cc.TargetInfo",
"localID": [
"c46/YsCPVOJYA4mWEpNYRx"
]
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "BgMusic", "_name": "BgMusic",
@@ -336,7 +353,7 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 14 "__id__": 17
} }
], ],
"_prefab": null, "_prefab": null,
@@ -375,7 +392,7 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 13 "__id__": 16
}, },
"_enabled": true, "_enabled": true,
"__prefab": null, "__prefab": null,
@@ -508,29 +525,29 @@
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",
"ambient": { "ambient": {
"__id__": 21
},
"shadows": {
"__id__": 22
},
"_skybox": {
"__id__": 23
},
"fog": {
"__id__": 24 "__id__": 24
}, },
"octree": { "shadows": {
"__id__": 25 "__id__": 25
}, },
"skin": { "_skybox": {
"__id__": 26 "__id__": 26
}, },
"lightProbeInfo": { "fog": {
"__id__": 27 "__id__": 27
}, },
"postSettings": { "octree": {
"__id__": 28 "__id__": 28
}, },
"skin": {
"__id__": 29
},
"lightProbeInfo": {
"__id__": 30
},
"postSettings": {
"__id__": 31
},
"bakedWithStationaryMainLight": false, "bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false "bakedWithHighpLightmap": false
}, },

File diff suppressed because it is too large Load Diff

View File

@@ -25,6 +25,12 @@ export class PageLevel extends BaseView {
/** 静态常量:零位置 */ /** 静态常量:零位置 */
private static readonly ZERO_POS = new Vec3(0, 0, 0); private static readonly ZERO_POS = new Vec3(0, 0, 0);
/** 解锁线索按钮默认文案 */
private static readonly UNLOCK_BUTTON_CLUE_TEXT = '查看线索';
/** 线索全部查看后的按钮文案 */
private static readonly UNLOCK_BUTTON_ANSWER_TEXT = '查看答案';
/** 默认体力上限,服务端未返回 max 时使用 */ /** 默认体力上限,服务端未返回 max 时使用 */
private static readonly DEFAULT_STAMINA_MAX = 50; private static readonly DEFAULT_STAMINA_MAX = 50;
@@ -704,17 +710,18 @@ export class PageLevel extends BaseView {
private showUnlockButton(_index?: number): void { private showUnlockButton(_index?: number): void {
if (this.unLockTipsBtn) { if (this.unLockTipsBtn) {
this.unLockTipsBtn.active = true; this.unLockTipsBtn.active = true;
this.setUnlockButtonText(PageLevel.UNLOCK_BUTTON_CLUE_TEXT);
console.log('[PageLevel] 显示解锁按钮'); console.log('[PageLevel] 显示解锁按钮');
} }
} }
/** /**
* 隐藏解锁按钮 * 更新底部线索/答案按钮文案
*/ */
private hideUnlockButton(_index?: number): void { private setUnlockButtonText(text: string): void {
if (this.unLockTipsBtn) { const label = this.unLockTipsBtn?.getChildByName('Label')?.getComponent(Label);
this.unLockTipsBtn.active = false; if (label) {
console.log('[PageLevel] 隐藏解锁按钮'); label.string = text;
} }
} }
@@ -747,12 +754,13 @@ export class PageLevel extends BaseView {
} }
/** /**
* 点击解锁线索顺序解锁先线索2再线索3全部解锁后提示已解锁完毕 * 点击解锁线索顺序解锁先线索2再线索3全部解锁后切换为查看答案入口
*/ */
private onUnlockClue(): void { private onUnlockClue(): void {
// 全部已解锁,提示用户 // 全部已解锁后,按钮保留为"查看答案",后续弹窗逻辑在这里接入
if (this._nextClueIndex > 3) { if (this._nextClueIndex > 3) {
ToastManager.show('已解锁完毕'); this.playClickSound();
console.log('[PageLevel] 点击查看答案,后续弹窗逻辑待接入');
return; return;
} }
@@ -771,9 +779,9 @@ export class PageLevel extends BaseView {
// 推进到下一条待解锁线索 // 推进到下一条待解锁线索
this._nextClueIndex++; this._nextClueIndex++;
// 全部解锁完毕隐藏按钮 // 全部解锁完毕后不隐藏按钮,改为查看答案入口
if (this._nextClueIndex > 3) { if (this._nextClueIndex > 3) {
this.hideUnlockButton(); this.setUnlockButtonText(PageLevel.UNLOCK_BUTTON_ANSWER_TEXT);
} }
console.log(`[PageLevel] 解锁线索${index}`); console.log(`[PageLevel] 解锁线索${index}`);
@@ -838,7 +846,18 @@ export class PageLevel extends BaseView {
private updateTitleLevelLabel(): void { private updateTitleLevelLabel(): void {
if (!this.titleLevelLabel) return; if (!this.titleLevelLabel) return;
this.titleLevelLabel.string = `${this._currentLevelNumber}`; this.titleLevelLabel.string = `${this.getDisplayLevelNumber()}`;
}
/**
* 服务端 level 使用 sortOrder首关可能为 0页面展示统一转成从 1 开始的关卡序号
*/
private getDisplayLevelNumber(): number {
if (this._isShareMode) {
return this._shareLevelIndex + 1;
}
return Math.max(1, this._currentLevelNumber + 1);
} }
/** /**
@@ -1251,7 +1270,7 @@ export class PageLevel extends BaseView {
const passModal = modalNode.getComponent(PassModal); const passModal = modalNode.getComponent(PassModal);
if (passModal) { if (passModal) {
passModal.setParams({ passModal.setParams({
levelIndex: this._currentLevelNumber, levelIndex: this.getDisplayLevelNumber(),
titleInfo: AchievementTitleManager.getTitleInfo(this._getPassModalCompletedLevelCount()) titleInfo: AchievementTitleManager.getTitleInfo(this._getPassModalCompletedLevelCount())
}); });
passModal.setCallbacks({ passModal.setCallbacks({
@@ -1368,7 +1387,7 @@ export class PageLevel extends BaseView {
const timeoutModal = modalNode.getComponent(TimeoutModal); const timeoutModal = modalNode.getComponent(TimeoutModal);
if (timeoutModal) { if (timeoutModal) {
timeoutModal.setParams({ timeoutModal.setParams({
levelIndex: this._currentLevelNumber levelIndex: this.getDisplayLevelNumber()
}); });
timeoutModal.setCallbacks({ timeoutModal.setCallbacks({
onShare: () => { onShare: () => {

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "71821be5-5211-42b0-8fc5-504b17797025",
"files": [],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f39e8d2d-5bf7-4729-82fa-5ab27f583845",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f39e8d2d-5bf7-4729-82fa-5ab27f583845@6c48a",
"displayName": "PicWin3",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f39e8d2d-5bf7-4729-82fa-5ab27f583845",
"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": "f39e8d2d-5bf7-4729-82fa-5ab27f583845@f9941",
"displayName": "PicWin3",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 2,
"offsetY": -4,
"trimX": 443,
"trimY": 148,
"width": 1276,
"height": 1696,
"rawWidth": 2158,
"rawHeight": 1984,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-638,
-848,
0,
638,
-848,
0,
-638,
848,
0,
638,
848,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
443,
1836,
1719,
1836,
443,
140,
1719,
140
],
"nuv": [
0.20528266913809082,
0.07056451612903226,
0.7965708989805376,
0.07056451612903226,
0.20528266913809082,
0.9254032258064516,
0.7965708989805376,
0.9254032258064516
],
"minPos": [
-638,
-848,
0
],
"maxPos": [
638,
848,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f39e8d2d-5bf7-4729-82fa-5ab27f583845@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "f39e8d2d-5bf7-4729-82fa-5ab27f583845@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "6cc690c9-5025-48e1-a533-3db4fa53b003",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "6cc690c9-5025-48e1-a533-3db4fa53b003@6c48a",
"displayName": "logo",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "6cc690c9-5025-48e1-a533-3db4fa53b003",
"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": "6cc690c9-5025-48e1-a533-3db4fa53b003@f9941",
"displayName": "logo",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1596,
"height": 626,
"rawWidth": 1596,
"rawHeight": 626,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-798,
-313,
0,
798,
-313,
0,
-798,
313,
0,
798,
313,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
626,
1596,
626,
0,
0,
1596,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-798,
-313,
0
],
"maxPos": [
798,
313,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "6cc690c9-5025-48e1-a533-3db4fa53b003@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "6cc690c9-5025-48e1-a533-3db4fa53b003@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "7ad02ee4-4166-4c57-8985-760cca1a41f8",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "7ad02ee4-4166-4c57-8985-760cca1a41f8@6c48a",
"displayName": "HomePicPanel_hsv_ffbb38",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "7ad02ee4-4166-4c57-8985-760cca1a41f8",
"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": "7ad02ee4-4166-4c57-8985-760cca1a41f8@f9941",
"displayName": "HomePicPanel_hsv_ffbb38",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0.5,
"trimX": 0,
"trimY": 0,
"width": 746,
"height": 955,
"rawWidth": 746,
"rawHeight": 956,
"borderTop": 100,
"borderBottom": 100,
"borderLeft": 100,
"borderRight": 100,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-373,
-477.5,
0,
373,
-477.5,
0,
-373,
477.5,
0,
373,
477.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
956,
746,
956,
0,
1,
746,
1
],
"nuv": [
0,
0.0010460251046025104,
1,
0.0010460251046025104,
0,
1,
1,
1
],
"minPos": [
-373,
-477.5,
0
],
"maxPos": [
373,
477.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "7ad02ee4-4166-4c57-8985-760cca1a41f8@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "7ad02ee4-4166-4c57-8985-760cca1a41f8@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f620b7ac-7415-45e3-8dd1-4d351aaaef93",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f620b7ac-7415-45e3-8dd1-4d351aaaef93@6c48a",
"displayName": "ProgressAnchor",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f620b7ac-7415-45e3-8dd1-4d351aaaef93",
"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": "f620b7ac-7415-45e3-8dd1-4d351aaaef93@f9941",
"displayName": "ProgressAnchor",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 68,
"height": 78,
"rawWidth": 68,
"rawHeight": 78,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 12,
"borderRight": 50,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-34,
-39,
0,
34,
-39,
0,
-34,
39,
0,
34,
39,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
78,
68,
78,
0,
0,
68,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-34,
-39,
0
],
"maxPos": [
34,
39,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f620b7ac-7415-45e3-8dd1-4d351aaaef93@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "f620b7ac-7415-45e3-8dd1-4d351aaaef93@6c48a"
}
}