From b365783e60b329809599e91de07ec1b4355d00b9 Mon Sep 17 00:00:00 2001 From: walkpan Date: Sat, 3 Jan 2026 23:10:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(hero):=20=E4=BF=AE=E5=A4=8D=E6=80=AA?= =?UTF-8?q?=E7=89=A9=E7=A7=BB=E5=8A=A8=E6=97=B6=E7=8A=B6=E6=80=81=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=97=AE=E9=A2=98=20refactor(gui):=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E8=83=9C=E5=88=A9=E7=95=8C=E9=9D=A2=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E5=92=8C=E7=BB=84=E4=BB=B6ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/gui/element/victory.prefab | 394 ++++++++++++-------- assets/script/game/hero/MonMove.ts | 4 +- 2 files changed, 237 insertions(+), 161 deletions(-) diff --git a/assets/resources/gui/element/victory.prefab b/assets/resources/gui/element/victory.prefab index e31a2d43..8893beae 100644 --- a/assets/resources/gui/element/victory.prefab +++ b/assets/resources/gui/element/victory.prefab @@ -25,20 +25,14 @@ "__id__": 10 }, { - "__id__": 36 + "__id__": 40 }, { - "__id__": 89 + "__id__": 93 } ], "_active": true, "_components": [ - { - "__id__": 106 - }, - { - "__id__": 108 - }, { "__id__": 110 }, @@ -47,10 +41,16 @@ }, { "__id__": 114 + }, + { + "__id__": 116 + }, + { + "__id__": 118 } ], "_prefab": { - "__id__": 116 + "__id__": 120 }, "_lpos": { "__type__": "cc.Vec3", @@ -275,20 +275,20 @@ "__id__": 19 }, { - "__id__": 25 + "__id__": 27 } ], "_active": true, "_components": [ { - "__id__": 31 + "__id__": 35 }, { - "__id__": 33 + "__id__": 37 } ], "_prefab": { - "__id__": 35 + "__id__": 39 }, "_lpos": { "__type__": "cc.Vec3", @@ -387,7 +387,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 700.0000000000006, - "height": 400 + "height": 880 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -513,15 +513,18 @@ }, { "__id__": 22 + }, + { + "__id__": 24 } ], "_prefab": { - "__id__": 24 + "__id__": 26 }, "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 187.262, + "y": 420, "z": 0 }, "_lrot": { @@ -623,6 +626,42 @@ "__type__": "cc.CompPrefabInfo", "fileId": "50x5H6NXFHfZLi3Mmu4uVV" }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": { + "__id__": 25 + }, + "_alignFlags": 1, + "_target": null, + "_left": 0, + "_right": 0, + "_top": -10, + "_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": "4fWR15m0VPO79cduWTm1Gk" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -648,19 +687,22 @@ "_active": true, "_components": [ { - "__id__": 26 + "__id__": 28 }, { - "__id__": 28 + "__id__": 30 + }, + { + "__id__": 32 } ], "_prefab": { - "__id__": 30 + "__id__": 34 }, "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 192.139, + "y": 422.8, "z": 0 }, "_lrot": { @@ -692,15 +734,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 25 + "__id__": 27 }, "_enabled": true, "__prefab": { - "__id__": 27 + "__id__": 29 }, "_contentSize": { "__type__": "cc.Size", - "width": 93.4482421875, + "width": 144, "height": 54.4 }, "_anchorPoint": { @@ -720,11 +762,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 25 + "__id__": 27 }, "_enabled": true, "__prefab": { - "__id__": 29 + "__id__": 31 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -736,7 +778,7 @@ "b": 255, "a": 255 }, - "_string": "奖 励", + "_string": "战斗结算", "_horizontalAlign": 1, "_verticalAlign": 1, "_actualFontSize": 35, @@ -782,6 +824,42 @@ "__type__": "cc.CompPrefabInfo", "fileId": "905AjVgzBEcJ65Z+WXm1i5" }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 27 + }, + "_enabled": true, + "__prefab": { + "__id__": 33 + }, + "_alignFlags": 1, + "_target": null, + "_left": 0, + "_right": 0, + "_top": -10, + "_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": "68rXUCb7ZEXZSihINjxoNF" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -805,12 +883,12 @@ }, "_enabled": true, "__prefab": { - "__id__": 32 + "__id__": 36 }, "_contentSize": { "__type__": "cc.Size", "width": 720.0000000000006, - "height": 400 + "height": 880 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -833,14 +911,14 @@ }, "_enabled": true, "__prefab": { - "__id__": 34 + "__id__": 38 }, - "_alignFlags": 42, + "_alignFlags": 45, "_target": null, "_left": 0, "_right": 0, - "_top": 590, - "_bottom": 590, + "_top": 200, + "_bottom": 200, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, @@ -850,7 +928,7 @@ "_isAbsHorizontalCenter": true, "_isAbsVerticalCenter": true, "_originalWidth": 100, - "_originalHeight": 100, + "_originalHeight": 800, "_alignMode": 2, "_lockFlags": 0, "_id": "" @@ -882,34 +960,34 @@ }, "_children": [ { - "__id__": 37 + "__id__": 41 }, { - "__id__": 52 + "__id__": 56 }, { - "__id__": 67 + "__id__": 71 } ], "_active": true, "_components": [ - { - "__id__": 82 - }, - { - "__id__": 84 - }, { "__id__": 86 + }, + { + "__id__": 88 + }, + { + "__id__": 90 } ], "_prefab": { - "__id__": 88 + "__id__": 92 }, "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -290, + "y": -340, "z": 0 }, "_lrot": { @@ -941,27 +1019,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 36 + "__id__": 40 }, "_children": [ { - "__id__": 38 + "__id__": 42 } ], "_active": true, "_components": [ - { - "__id__": 44 - }, - { - "__id__": 46 - }, { "__id__": 48 + }, + { + "__id__": 50 + }, + { + "__id__": 52 } ], "_prefab": { - "__id__": 51 + "__id__": 55 }, "_lpos": { "__type__": "cc.Vec3", @@ -998,20 +1076,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 37 + "__id__": 41 }, "_children": [], "_active": true, "_components": [ { - "__id__": 39 + "__id__": 43 }, { - "__id__": 41 + "__id__": 45 } ], "_prefab": { - "__id__": 43 + "__id__": 47 }, "_lpos": { "__type__": "cc.Vec3", @@ -1048,11 +1126,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 38 + "__id__": 42 }, "_enabled": true, "__prefab": { - "__id__": 40 + "__id__": 44 }, "_contentSize": { "__type__": "cc.Size", @@ -1076,11 +1154,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 38 + "__id__": 42 }, "_enabled": true, "__prefab": { - "__id__": 42 + "__id__": 46 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1157,15 +1235,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 37 + "__id__": 41 }, "_enabled": true, "__prefab": { - "__id__": 45 + "__id__": 49 }, "_contentSize": { "__type__": "cc.Size", - "width": 255, + "width": 240, "height": 100 }, "_anchorPoint": { @@ -1185,11 +1263,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 37 + "__id__": 41 }, "_enabled": true, "__prefab": { - "__id__": 47 + "__id__": 51 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1233,15 +1311,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 37 + "__id__": 41 }, "_enabled": true, "__prefab": { - "__id__": 49 + "__id__": 53 }, "clickEvents": [ { - "__id__": 50 + "__id__": 54 } ], "_interactable": true, @@ -1316,31 +1394,31 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 36 + "__id__": 40 }, "_children": [ { - "__id__": 53 + "__id__": 57 } ], "_active": false, "_components": [ - { - "__id__": 59 - }, - { - "__id__": 61 - }, { "__id__": 63 + }, + { + "__id__": 65 + }, + { + "__id__": 67 } ], "_prefab": { - "__id__": 66 + "__id__": 70 }, "_lpos": { "__type__": "cc.Vec3", - "x": -72.5, + "x": 135, "y": 0, "z": 0 }, @@ -1373,20 +1451,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 52 + "__id__": 56 }, "_children": [], "_active": true, "_components": [ { - "__id__": 54 + "__id__": 58 }, { - "__id__": 56 + "__id__": 60 } ], "_prefab": { - "__id__": 58 + "__id__": 62 }, "_lpos": { "__type__": "cc.Vec3", @@ -1423,11 +1501,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 53 + "__id__": 57 }, "_enabled": true, "__prefab": { - "__id__": 55 + "__id__": 59 }, "_contentSize": { "__type__": "cc.Size", @@ -1451,11 +1529,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 53 + "__id__": 57 }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 61 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1532,15 +1610,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 52 + "__id__": 56 }, "_enabled": true, "__prefab": { - "__id__": 60 + "__id__": 64 }, "_contentSize": { "__type__": "cc.Size", - "width": 400, + "width": 380, "height": 100 }, "_anchorPoint": { @@ -1560,11 +1638,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 52 + "__id__": 56 }, "_enabled": true, "__prefab": { - "__id__": 62 + "__id__": 66 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1608,15 +1686,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 52 + "__id__": 56 }, "_enabled": true, "__prefab": { - "__id__": 64 + "__id__": 68 }, "clickEvents": [ { - "__id__": 65 + "__id__": 69 } ], "_interactable": true, @@ -1691,27 +1769,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 36 + "__id__": 40 }, "_children": [ { - "__id__": 68 + "__id__": 72 } ], "_active": false, "_components": [ - { - "__id__": 74 - }, - { - "__id__": 76 - }, { "__id__": 78 + }, + { + "__id__": 80 + }, + { + "__id__": 82 } ], "_prefab": { - "__id__": 81 + "__id__": 85 }, "_lpos": { "__type__": "cc.Vec3", @@ -1748,20 +1826,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 67 + "__id__": 71 }, "_children": [], "_active": true, "_components": [ { - "__id__": 69 + "__id__": 73 }, { - "__id__": 71 + "__id__": 75 } ], "_prefab": { - "__id__": 73 + "__id__": 77 }, "_lpos": { "__type__": "cc.Vec3", @@ -1798,11 +1876,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 72 }, "_enabled": true, "__prefab": { - "__id__": 70 + "__id__": 74 }, "_contentSize": { "__type__": "cc.Size", @@ -1826,11 +1904,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 72 }, "_enabled": true, "__prefab": { - "__id__": 72 + "__id__": 76 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1907,15 +1985,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 71 }, "_enabled": true, "__prefab": { - "__id__": 75 + "__id__": 79 }, "_contentSize": { "__type__": "cc.Size", - "width": 400, + "width": 380, "height": 100 }, "_anchorPoint": { @@ -1935,11 +2013,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 71 }, "_enabled": true, "__prefab": { - "__id__": 77 + "__id__": 81 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1983,15 +2061,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 71 }, "_enabled": true, "__prefab": { - "__id__": 79 + "__id__": 83 }, "clickEvents": [ { - "__id__": 80 + "__id__": 84 } ], "_interactable": true, @@ -2066,15 +2144,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 36 + "__id__": 40 }, "_enabled": true, "__prefab": { - "__id__": 83 + "__id__": 87 }, "_contentSize": { "__type__": "cc.Size", - "width": 315, + "width": 300, "height": 100 }, "_anchorPoint": { @@ -2094,11 +2172,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 36 + "__id__": 40 }, "_enabled": true, "__prefab": { - "__id__": 85 + "__id__": 89 }, "_resizeMode": 1, "_layoutType": 1, @@ -2132,18 +2210,18 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 36 + "__id__": 40 }, "_enabled": true, "__prefab": { - "__id__": 87 + "__id__": 91 }, "_alignFlags": 4, "_target": null, "_left": 0, "_right": 0, "_top": 0, - "_bottom": 300, + "_bottom": 250, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, @@ -2182,14 +2260,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 90 + "__id__": 94 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 89 + "__id__": 93 }, "asset": { "__uuid__": "26bff847-cd29-48a5-bbfa-c3e2dbda688d", @@ -2197,7 +2275,7 @@ }, "fileId": "5a9CMsVQhKP5Y+UJfTKPbx", "instance": { - "__id__": 91 + "__id__": 95 }, "targetOverrides": null }, @@ -2210,32 +2288,32 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 92 - }, - { - "__id__": 94 - }, - { - "__id__": 95 - }, { "__id__": 96 }, - { - "__id__": 97 - }, { "__id__": 98 }, + { + "__id__": 99 + }, { "__id__": 100 }, + { + "__id__": 101 + }, { "__id__": 102 }, { "__id__": 104 + }, + { + "__id__": 106 + }, + { + "__id__": 108 } ], "removedComponents": [] @@ -2243,7 +2321,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 93 + "__id__": 97 }, "propertyPath": [ "_name" @@ -2259,7 +2337,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 93 + "__id__": 97 }, "propertyPath": [ "_lpos" @@ -2274,7 +2352,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 93 + "__id__": 97 }, "propertyPath": [ "_lrot" @@ -2290,7 +2368,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 93 + "__id__": 97 }, "propertyPath": [ "_euler" @@ -2305,7 +2383,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 93 + "__id__": 97 }, "propertyPath": [ "_active" @@ -2315,7 +2393,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 99 + "__id__": 103 }, "propertyPath": [ "_contentSize" @@ -2335,7 +2413,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 101 + "__id__": 105 }, "propertyPath": [ "_contentSize" @@ -2355,7 +2433,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 103 + "__id__": 107 }, "propertyPath": [ "_contentSize" @@ -2376,7 +2454,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 105 + "__id__": 109 }, "propertyPath": [ "_contentSize" @@ -2404,7 +2482,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 107 + "__id__": 111 }, "_contentSize": { "__type__": "cc.Size", @@ -2432,7 +2510,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 109 + "__id__": 113 }, "_id": "" }, @@ -2450,7 +2528,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 111 + "__id__": 115 }, "_alignFlags": 45, "_target": null, @@ -2486,7 +2564,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 113 + "__id__": 117 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2528,7 +2606,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 115 + "__id__": 119 }, "_id": "" }, @@ -2549,7 +2627,7 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": [ { - "__id__": 89 + "__id__": 93 } ] } diff --git a/assets/script/game/hero/MonMove.ts b/assets/script/game/hero/MonMove.ts index ba0d9513..95dadc22 100644 --- a/assets/script/game/hero/MonMove.ts +++ b/assets/script/game/hero/MonMove.ts @@ -97,9 +97,7 @@ export class MonMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpda move.moving = false; } } else { - if (!model.is_atking) { - view.status_change("idle"); - } + view.status_change("idle"); } }