feat: 支持分享模式二次确认弹窗;默认展示线索 1

This commit is contained in:
richarjiang
2026-05-11 23:05:49 +08:00
parent 37b9ab1cb6
commit 8b27dc7bc5
4 changed files with 355 additions and 28 deletions

View File

@@ -40,7 +40,7 @@ Git 历史采用 Conventional Commits且摘要多为中文例如 `feat:
<claude-mem-context>
# Memory Context
# $CMEM mp-xieyingeng 2026-05-11 9:03am GMT+8
# $CMEM mp-xieyingeng 2026-05-11 11:01pm GMT+8
Legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖decision
Format: ID TIME TYPE TITLE

View File

@@ -28,17 +28,17 @@
"_active": true,
"_components": [
{
"__id__": 62
"__id__": 76
},
{
"__id__": 64
"__id__": 78
},
{
"__id__": 66
"__id__": 80
}
],
"_prefab": {
"__id__": 68
"__id__": 82
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -272,14 +272,14 @@
"_active": true,
"_components": [
{
"__id__": 57
"__id__": 71
},
{
"__id__": 59
"__id__": 73
}
],
"_prefab": {
"__id__": 61
"__id__": 75
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1315,18 +1315,22 @@
"_parent": {
"__id__": 10
},
"_children": [],
"_children": [
{
"__id__": 52
}
],
"_active": true,
"_components": [
{
"__id__": 52
"__id__": 66
},
{
"__id__": 54
"__id__": 68
}
],
"_prefab": {
"__id__": 56
"__id__": 70
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1357,6 +1361,308 @@
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Mask",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 51
},
"_children": [
{
"__id__": 53
}
],
"_active": true,
"_components": [
{
"__id__": 59
},
{
"__id__": 61
},
{
"__id__": 63
}
],
"_prefab": {
"__id__": 65
},
"_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": "1_0030_head",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 52
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 54
},
{
"__id__": 56
}
],
"_prefab": {
"__id__": 58
},
"_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__": 53
},
"_enabled": true,
"__prefab": {
"__id__": 55
},
"_contentSize": {
"__type__": "cc.Size",
"width": 278,
"height": 278
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "245K9UiFpEdrNLY2NqcCsB"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 53
},
"_enabled": true,
"__prefab": {
"__id__": 57
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "4d74de13-4f34-4bea-a040-68d2bc0655af@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": "46bZuBYp1CroDQUV/hkud/"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "7fU5Eb1P1N7LP0LjtSuSWq",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 52
},
"_enabled": true,
"__prefab": {
"__id__": 60
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "7cZ7SL9I9EzYkX/4JNBUw1"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 52
},
"_enabled": true,
"__prefab": {
"__id__": 62
},
"_type": 1,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3bPEQ3MDtOnKM5ymLbaHAy"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 52
},
"_enabled": true,
"__prefab": {
"__id__": 64
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "44llr1xbVNUp+ue9KRLTBe"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "18DC6N7SdK7qvTu0exhraB",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
@@ -1367,7 +1673,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 53
"__id__": 67
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1395,7 +1701,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 55
"__id__": 69
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -1453,7 +1759,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 58
"__id__": 72
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1481,7 +1787,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 60
"__id__": 74
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -1539,7 +1845,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 63
"__id__": 77
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1567,7 +1873,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 65
"__id__": 79
},
"_alignFlags": 45,
"_target": null,
@@ -1603,7 +1909,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 67
"__id__": 81
},
"animationNodes": [],
"backdropNode": null,

View File

@@ -4986,8 +4986,6 @@
"__id__": 0
},
"fileId": "97e+ktL5JEFIkipb5zofcN",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
@@ -5379,8 +5377,6 @@
"__id__": 0
},
"fileId": "1eqqQHgzlAlIvfIdI7x5Es",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
@@ -9295,7 +9291,9 @@
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_target": {
"__id__": 364
},
"_id": ""
},
{
@@ -9311,8 +9309,6 @@
"__id__": 0
},
"fileId": "9cckUTm+pH7K6q+8gd2LGK",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
@@ -9552,4 +9548,4 @@
"instance": null,
"targetOverrides": null
}
]
]

View File

@@ -1,4 +1,4 @@
import { _decorator, Node, EditBox, instantiate, Vec3, Button, Label, Sprite, SpriteFrame, AudioClip, AudioSource, Prefab, EffectAsset, UITransform, UIOpacity, tween, Tween, Color } from 'cc';
import { _decorator, Node, EditBox, instantiate, Vec3, Button, Label, Sprite, SpriteFrame, AudioClip, AudioSource, Prefab, EffectAsset, UITransform, UIOpacity, tween, Tween, Color, Layout } from 'cc';
import { BaseView } from 'db://assets/scripts/core/BaseView';
import { ViewManager } from 'db://assets/scripts/core/ViewManager';
import { StaminaManager } from 'db://assets/scripts/utils/StaminaManager';
@@ -69,6 +69,9 @@ export class PageLevel extends BaseView {
/** 谐音梗揭示动画punchLayout 在 InputLayout 动起来后再出现的延迟(让动画有节奏) */
private static readonly PUNCH_REVEAL_DELAY = 0.1;
/** 分享模式只展示提示 1 时,固定放回 TipsLayout 顶部,避免 Layout 把它排到底部被下一题按钮遮挡 */
private static readonly SHARE_MODE_TIP1_Y = 120;
// ========== 节点引用 ==========
@property(Node)
inputLayout: Node | null = null;
@@ -1151,7 +1154,9 @@ export class PageLevel extends BaseView {
}
if (this._isShareMode) {
this._setTipsLayoutEnabled(false);
this.showClue(1);
this._placeShareModeTip1();
this.hideClue(2);
this.hideClue(3);
if (this.unLockTipsBtn) {
@@ -1160,6 +1165,7 @@ export class PageLevel extends BaseView {
return;
}
this._setTipsLayoutEnabled(true);
this.showClue(1);
this.showClue(2);
this.showClue(3);
@@ -1168,6 +1174,25 @@ export class PageLevel extends BaseView {
}
}
private _setTipsLayoutEnabled(enabled: boolean): void {
const layout = this.tipsLayout?.getComponent(Layout);
if (layout) {
layout.enabled = enabled;
}
}
private _placeShareModeTip1(): void {
if (!this.tipsItem1) {
return;
}
this.tipsItem1.setPosition(
this.tipsItem1.position.x,
PageLevel.SHARE_MODE_TIP1_Y,
this.tipsItem1.position.z,
);
}
/**
* 服务端 level 使用 sortOrder首关可能为 0页面展示统一转成从 1 开始的关卡序号
*/