From a638f473a0e5d896f68dbebbea15b6a0858a0e1e Mon Sep 17 00:00:00 2001 From: walkpan Date: Sat, 28 Mar 2026 12:04:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E5=87=BA=E5=94=AE=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?UI=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Hero 类中添加 removeByEid 静态方法,用于安全移除英雄实体 - 在 HInfoComp 中集成出售按钮逻辑,点击可移除对应英雄并关闭信息面板 - 为 card.prefab 和 hnode.prefab 添加召唤/出售按钮及相关UI组件 - 调整 role_controller.prefab 面板高度并禁用部分组件 - 移除未使用的 hit-flash-white 场景资源文件 - 暂时注释 CardComp 中的触摸事件绑定以进行调试 --- assets/resources/gui/element/card.prefab | 392 ++++- assets/resources/gui/element/hnode.prefab | 474 ++++-- assets/resources/gui/role_controller.prefab | 4 +- assets/script/game/hero/Hero.ts | 11 + .../game/hero/hit-flash-white/scenes.meta | 9 - .../scenes/2D-hit-flash-white.scene | 1414 ----------------- .../scenes/2D-hit-flash-white.scene.meta | 11 - assets/script/game/map/CardComp.ts | 24 +- assets/script/game/map/HInfoComp.ts | 37 +- 9 files changed, 753 insertions(+), 1623 deletions(-) delete mode 100644 assets/script/game/hero/hit-flash-white/scenes.meta delete mode 100644 assets/script/game/hero/hit-flash-white/scenes/2D-hit-flash-white.scene delete mode 100644 assets/script/game/hero/hit-flash-white/scenes/2D-hit-flash-white.scene.meta diff --git a/assets/resources/gui/element/card.prefab b/assets/resources/gui/element/card.prefab index 632bc9d2..2d073e30 100644 --- a/assets/resources/gui/element/card.prefab +++ b/assets/resources/gui/element/card.prefab @@ -47,19 +47,22 @@ }, { "__id__": 150 + }, + { + "__id__": 196 } ], "_active": true, "_components": [ { - "__id__": 196 + "__id__": 211 }, { - "__id__": 198 + "__id__": 213 } ], "_prefab": { - "__id__": 200 + "__id__": 215 }, "_lpos": { "__type__": "cc.Vec3", @@ -2279,7 +2282,7 @@ "__id__": 101 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 107 @@ -2530,7 +2533,7 @@ "a": 255 }, "_spriteFrame": { - "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@13f92", + "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@15f3b", "__expectedType__": "cc.SpriteFrame" }, "_type": 0, @@ -4562,6 +4565,381 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, + { + "__type__": "cc.Node", + "_name": "use", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 197 + } + ], + "_active": true, + "_components": [ + { + "__id__": 203 + }, + { + "__id__": 205 + }, + { + "__id__": 207 + } + ], + "_prefab": { + "__id__": 210 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -140.805, + "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__": 196 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 198 + }, + { + "__id__": 200 + } + ], + "_prefab": { + "__id__": 202 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 2, + "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__": 197 + }, + "_enabled": true, + "__prefab": { + "__id__": 199 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60.94580078125, + "height": 54.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "eeZuu04rJFzoa4hbflZ24S" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 197 + }, + "_enabled": true, + "__prefab": { + "__id__": 201 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "召 唤", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 25, + "_fontSize": 25, + "_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": true, + "_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": "20iOHSh+RE9I1iLzeZ3LBi" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "0bHU/Up11A8YP6z6eGMtQU", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 196 + }, + "_enabled": true, + "__prefab": { + "__id__": 204 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 45 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "106cH+DGZAxooglHMvE045" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 196 + }, + "_enabled": true, + "__prefab": { + "__id__": 206 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@15f3b", + "__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": { + "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "81ukyY51tDrL2JwfvnGb6H" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 196 + }, + "_enabled": true, + "__prefab": { + "__id__": 208 + }, + "clickEvents": [ + { + "__id__": 209 + } + ], + "_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": "d5rlKxmj5A4Jw0V9vPZk0N" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "c4842RlEXFBsYWrZpIuY9c0", + "handler": "useCard", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "ebG3ulmyZGU7zACc3IXmag", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -4572,7 +4950,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 197 + "__id__": 212 }, "_contentSize": { "__type__": "cc.Size", @@ -4600,7 +4978,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 199 + "__id__": 214 }, "Lock": { "__id__": 100 diff --git a/assets/resources/gui/element/hnode.prefab b/assets/resources/gui/element/hnode.prefab index ed4a83ad..49738b49 100644 --- a/assets/resources/gui/element/hnode.prefab +++ b/assets/resources/gui/element/hnode.prefab @@ -25,29 +25,29 @@ "__id__": 10 }, { - "__id__": 18 + "__id__": 21 }, { - "__id__": 46 + "__id__": 49 }, { - "__id__": 74 + "__id__": 77 }, { - "__id__": 98 + "__id__": 101 } ], "_active": true, "_components": [ { - "__id__": 110 + "__id__": 116 }, { - "__id__": 112 + "__id__": 118 } ], "_prefab": { - "__id__": 114 + "__id__": 120 }, "_lpos": { "__type__": "cc.Vec3", @@ -275,10 +275,13 @@ }, { "__id__": 15 + }, + { + "__id__": 17 } ], "_prefab": { - "__id__": 17 + "__id__": 20 }, "_lpos": { "__type__": "cc.Vec3", @@ -408,6 +411,76 @@ "__type__": "cc.CompPrefabInfo", "fileId": "2e7ip9iHRCkpgbEWKgWSjG" }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "clickEvents": [ + { + "__id__": 19 + } + ], + "_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": "73MCitGDJBKb3711PNpTHA" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "a832fh9yR9LJK1kR+tZ1lin", + "handler": "onOpenIBox", + "customEventData": "" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -431,29 +504,29 @@ }, "_children": [ { - "__id__": 19 + "__id__": 22 }, { - "__id__": 27 + "__id__": 30 }, { - "__id__": 33 + "__id__": 36 } ], "_active": true, "_components": [ { - "__id__": 39 + "__id__": 42 }, { - "__id__": 41 + "__id__": 44 }, { - "__id__": 43 + "__id__": 46 } ], "_prefab": { - "__id__": 45 + "__id__": 48 }, "_lpos": { "__type__": "cc.Vec3", @@ -490,23 +563,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 18 + "__id__": 21 }, "_children": [], "_active": true, "_components": [ { - "__id__": 20 + "__id__": 23 }, { - "__id__": 22 + "__id__": 25 }, { - "__id__": 24 + "__id__": 27 } ], "_prefab": { - "__id__": 26 + "__id__": 29 }, "_lpos": { "__type__": "cc.Vec3", @@ -543,11 +616,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 19 + "__id__": 22 }, "_enabled": true, "__prefab": { - "__id__": 21 + "__id__": 24 }, "_contentSize": { "__type__": "cc.Size", @@ -571,11 +644,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 19 + "__id__": 22 }, "_enabled": true, "__prefab": { - "__id__": 23 + "__id__": 26 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -616,11 +689,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 19 + "__id__": 22 }, "_enabled": true, "__prefab": { - "__id__": 25 + "__id__": 28 }, "_alignFlags": 45, "_target": null, @@ -665,20 +738,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 18 + "__id__": 21 }, "_children": [], "_active": true, "_components": [ { - "__id__": 28 + "__id__": 31 }, { - "__id__": 30 + "__id__": 33 } ], "_prefab": { - "__id__": 32 + "__id__": 35 }, "_lpos": { "__type__": "cc.Vec3", @@ -715,11 +788,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 27 + "__id__": 30 }, "_enabled": true, "__prefab": { - "__id__": 29 + "__id__": 32 }, "_contentSize": { "__type__": "cc.Size", @@ -743,11 +816,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 27 + "__id__": 30 }, "_enabled": true, "__prefab": { - "__id__": 31 + "__id__": 34 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -801,20 +874,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 18 + "__id__": 21 }, "_children": [], "_active": true, "_components": [ { - "__id__": 34 + "__id__": 37 }, { - "__id__": 36 + "__id__": 39 } ], "_prefab": { - "__id__": 38 + "__id__": 41 }, "_lpos": { "__type__": "cc.Vec3", @@ -851,11 +924,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 33 + "__id__": 36 }, "_enabled": true, "__prefab": { - "__id__": 35 + "__id__": 38 }, "_contentSize": { "__type__": "cc.Size", @@ -879,11 +952,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 33 + "__id__": 36 }, "_enabled": true, "__prefab": { - "__id__": 37 + "__id__": 40 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -960,11 +1033,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 18 + "__id__": 21 }, "_enabled": true, "__prefab": { - "__id__": 40 + "__id__": 43 }, "_contentSize": { "__type__": "cc.Size", @@ -988,11 +1061,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 18 + "__id__": 21 }, "_enabled": false, "__prefab": { - "__id__": 42 + "__id__": 45 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1033,11 +1106,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 18 + "__id__": 21 }, "_enabled": true, "__prefab": { - "__id__": 44 + "__id__": 47 }, "_alignFlags": 44, "_target": null, @@ -1086,29 +1159,29 @@ }, "_children": [ { - "__id__": 47 + "__id__": 50 }, { - "__id__": 55 + "__id__": 58 }, { - "__id__": 61 + "__id__": 64 } ], "_active": true, "_components": [ { - "__id__": 67 + "__id__": 70 }, { - "__id__": 69 + "__id__": 72 }, { - "__id__": 71 + "__id__": 74 } ], "_prefab": { - "__id__": 73 + "__id__": 76 }, "_lpos": { "__type__": "cc.Vec3", @@ -1145,23 +1218,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 46 + "__id__": 49 }, "_children": [], "_active": true, "_components": [ { - "__id__": 48 + "__id__": 51 }, { - "__id__": 50 + "__id__": 53 }, { - "__id__": 52 + "__id__": 55 } ], "_prefab": { - "__id__": 54 + "__id__": 57 }, "_lpos": { "__type__": "cc.Vec3", @@ -1198,11 +1271,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 47 + "__id__": 50 }, "_enabled": true, "__prefab": { - "__id__": 49 + "__id__": 52 }, "_contentSize": { "__type__": "cc.Size", @@ -1226,11 +1299,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 47 + "__id__": 50 }, "_enabled": true, "__prefab": { - "__id__": 51 + "__id__": 54 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1271,11 +1344,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 47 + "__id__": 50 }, "_enabled": true, "__prefab": { - "__id__": 53 + "__id__": 56 }, "_alignFlags": 45, "_target": null, @@ -1320,20 +1393,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 46 + "__id__": 49 }, "_children": [], "_active": true, "_components": [ { - "__id__": 56 + "__id__": 59 }, { - "__id__": 58 + "__id__": 61 } ], "_prefab": { - "__id__": 60 + "__id__": 63 }, "_lpos": { "__type__": "cc.Vec3", @@ -1370,11 +1443,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 55 + "__id__": 58 }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 60 }, "_contentSize": { "__type__": "cc.Size", @@ -1398,11 +1471,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 55 + "__id__": 58 }, "_enabled": true, "__prefab": { - "__id__": 59 + "__id__": 62 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1456,20 +1529,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 46 + "__id__": 49 }, "_children": [], "_active": true, "_components": [ { - "__id__": 62 + "__id__": 65 }, { - "__id__": 64 + "__id__": 67 } ], "_prefab": { - "__id__": 66 + "__id__": 69 }, "_lpos": { "__type__": "cc.Vec3", @@ -1506,11 +1579,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 61 + "__id__": 64 }, "_enabled": true, "__prefab": { - "__id__": 63 + "__id__": 66 }, "_contentSize": { "__type__": "cc.Size", @@ -1534,11 +1607,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 61 + "__id__": 64 }, "_enabled": true, "__prefab": { - "__id__": 65 + "__id__": 68 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1615,11 +1688,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 46 + "__id__": 49 }, "_enabled": true, "__prefab": { - "__id__": 68 + "__id__": 71 }, "_contentSize": { "__type__": "cc.Size", @@ -1643,11 +1716,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 46 + "__id__": 49 }, "_enabled": false, "__prefab": { - "__id__": 70 + "__id__": 73 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1688,11 +1761,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 46 + "__id__": 49 }, "_enabled": true, "__prefab": { - "__id__": 72 + "__id__": 75 }, "_alignFlags": 44, "_target": null, @@ -1741,26 +1814,26 @@ }, "_children": [ { - "__id__": 75 + "__id__": 78 }, { - "__id__": 81 + "__id__": 84 }, { - "__id__": 87 + "__id__": 90 } ], "_active": true, "_components": [ { - "__id__": 93 + "__id__": 96 }, { - "__id__": 95 + "__id__": 98 } ], "_prefab": { - "__id__": 97 + "__id__": 100 }, "_lpos": { "__type__": "cc.Vec3", @@ -1797,20 +1870,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 74 + "__id__": 77 }, "_children": [], "_active": true, "_components": [ { - "__id__": 76 + "__id__": 79 }, { - "__id__": 78 + "__id__": 81 } ], "_prefab": { - "__id__": 80 + "__id__": 83 }, "_lpos": { "__type__": "cc.Vec3", @@ -1847,11 +1920,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 75 + "__id__": 78 }, "_enabled": true, "__prefab": { - "__id__": 77 + "__id__": 80 }, "_contentSize": { "__type__": "cc.Size", @@ -1875,11 +1948,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 75 + "__id__": 78 }, "_enabled": true, "__prefab": { - "__id__": 79 + "__id__": 82 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1936,20 +2009,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 74 + "__id__": 77 }, "_children": [], "_active": true, "_components": [ { - "__id__": 82 + "__id__": 85 }, { - "__id__": 84 + "__id__": 87 } ], "_prefab": { - "__id__": 86 + "__id__": 89 }, "_lpos": { "__type__": "cc.Vec3", @@ -1986,11 +2059,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 81 + "__id__": 84 }, "_enabled": true, "__prefab": { - "__id__": 83 + "__id__": 86 }, "_contentSize": { "__type__": "cc.Size", @@ -2014,11 +2087,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 81 + "__id__": 84 }, "_enabled": true, "__prefab": { - "__id__": 85 + "__id__": 88 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2075,20 +2148,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 74 + "__id__": 77 }, "_children": [], "_active": true, "_components": [ { - "__id__": 88 + "__id__": 91 }, { - "__id__": 90 + "__id__": 93 } ], "_prefab": { - "__id__": 92 + "__id__": 95 }, "_lpos": { "__type__": "cc.Vec3", @@ -2125,11 +2198,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 87 + "__id__": 90 }, "_enabled": true, "__prefab": { - "__id__": 89 + "__id__": 92 }, "_contentSize": { "__type__": "cc.Size", @@ -2153,11 +2226,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 87 + "__id__": 90 }, "_enabled": true, "__prefab": { - "__id__": 91 + "__id__": 94 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2214,11 +2287,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 74 + "__id__": 77 }, "_enabled": true, "__prefab": { - "__id__": 94 + "__id__": 97 }, "_contentSize": { "__type__": "cc.Size", @@ -2242,11 +2315,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 74 + "__id__": 77 }, "_enabled": true, "__prefab": { - "__id__": 96 + "__id__": 99 }, "_resizeMode": 1, "_layoutType": 1, @@ -2297,25 +2370,28 @@ }, "_children": [ { - "__id__": 99 + "__id__": 102 } ], "_active": true, "_components": [ { - "__id__": 105 + "__id__": 108 }, { - "__id__": 107 + "__id__": 110 + }, + { + "__id__": 112 } ], "_prefab": { - "__id__": 109 + "__id__": 115 }, "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -95.425, + "y": -95.647, "z": 0 }, "_lrot": { @@ -2344,28 +2420,28 @@ { "__type__": "cc.Node", "_name": "Label", - "_objFlags": 0, + "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 98 + "__id__": 101 }, "_children": [], "_active": true, "_components": [ { - "__id__": 100 + "__id__": 103 }, { - "__id__": 102 + "__id__": 105 } ], "_prefab": { - "__id__": 104 + "__id__": 107 }, "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 2.007, + "y": 1.673, "z": 0 }, "_lrot": { @@ -2397,16 +2473,16 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 102 }, "_enabled": true, "__prefab": { - "__id__": 101 + "__id__": 104 }, "_contentSize": { "__type__": "cc.Size", - "width": 44, - "height": 54.4 + "width": 100, + "height": 40 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -2417,7 +2493,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "18NQeaOHtH643bVxMxlzC/" + "fileId": "beLiMTPttGcq3lnu7v4T24" }, { "__type__": "cc.Label", @@ -2425,11 +2501,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 102 }, "_enabled": true, "__prefab": { - "__id__": 103 + "__id__": 106 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2444,12 +2520,12 @@ "_string": "出售", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 20, - "_fontSize": 20, + "_actualFontSize": 25, + "_fontSize": 25, "_fontFamily": "Arial", "_lineHeight": 40, - "_overflow": 0, - "_enableWrapText": true, + "_overflow": 1, + "_enableWrapText": false, "_font": null, "_isSystemFontUsed": true, "_spacingX": 0, @@ -2485,7 +2561,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "89l+4jD8BLIrfkYGYOKmrV" + "fileId": "51Wu0y8SdOULl5DoOOp3rz" }, { "__type__": "cc.PrefabInfo", @@ -2495,7 +2571,7 @@ "asset": { "__id__": 0 }, - "fileId": "1fpqKXZ+tC+LUBwL7n9siF", + "fileId": "2bHJzGsaZL07qUuOeI326l", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -2506,11 +2582,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 101 }, "_enabled": true, "__prefab": { - "__id__": 106 + "__id__": 109 }, "_contentSize": { "__type__": "cc.Size", @@ -2526,7 +2602,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "feZrk9RTtIEb/JioICZ8xt" + "fileId": "4cFZYaVY1KjqFaFxy/FjK9" }, { "__type__": "cc.Sprite", @@ -2534,11 +2610,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 101 }, "_enabled": true, "__prefab": { - "__id__": 108 + "__id__": 111 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2574,7 +2650,91 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "28DFEDDLBFqpYWBwLgJM5a" + "fileId": "13NwE3uwdMeZLanD/Kirhv" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 101 + }, + "_enabled": true, + "__prefab": { + "__id__": 113 + }, + "clickEvents": [ + { + "__id__": 114 + } + ], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "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": { + "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@7645f", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": { + "__id__": 101 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "56wpoEM/ZMrpxad3T7+vHu" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "a832fh9yR9LJK1kR+tZ1lin", + "handler": "onSellHero", + "customEventData": "" }, { "__type__": "cc.PrefabInfo", @@ -2584,7 +2744,7 @@ "asset": { "__id__": 0 }, - "fileId": "19lplYfiZNyrEeHdxdeelx", + "fileId": "02JrX+YSZAXZFrDj1ZF6Vq", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -2599,7 +2759,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 111 + "__id__": 117 }, "_contentSize": { "__type__": "cc.Size", @@ -2627,14 +2787,12 @@ }, "_enabled": true, "__prefab": { - "__id__": 113 + "__id__": 119 }, "icon_node": { "__id__": 10 }, - "sell_node": { - "__id__": 98 - }, + "sell_node": null, "_id": "" }, { diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index 4531a4aa..46ce01b0 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -11739,7 +11739,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 720, - "height": 500 + "height": 450 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -11834,7 +11834,7 @@ "node": { "__id__": 70 }, - "_enabled": true, + "_enabled": false, "__prefab": { "__id__": 570 }, diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 45d2d439..1221ec3f 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -45,6 +45,17 @@ export class Hero extends ecs.Entity { super.destroy(); } + static removeByEid(eid: number): boolean { + const targetEid = Math.floor(eid); + if (!targetEid) return false; + const entity = ecs.getEntityByEid(targetEid); + if (!entity) return false; + const model = entity.get(HeroAttrsComp); + if (!model || model.fac !== FacSet.HERO) return false; + entity.destroy(); + return true; + } + /** * 加载并初始化英雄 diff --git a/assets/script/game/hero/hit-flash-white/scenes.meta b/assets/script/game/hero/hit-flash-white/scenes.meta deleted file mode 100644 index 48f8d2ae..00000000 --- a/assets/script/game/hero/hit-flash-white/scenes.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "1.2.0", - "importer": "directory", - "imported": true, - "uuid": "e091410c-c7b6-4416-ae99-38697c103286", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/hero/hit-flash-white/scenes/2D-hit-flash-white.scene b/assets/script/game/hero/hit-flash-white/scenes/2D-hit-flash-white.scene deleted file mode 100644 index c84512f1..00000000 --- a/assets/script/game/hero/hit-flash-white/scenes/2D-hit-flash-white.scene +++ /dev/null @@ -1,1414 +0,0 @@ -[ - { - "__type__": "cc.SceneAsset", - "_name": "2D-hit-flash-white", - "_objFlags": 0, - "__editorExtras__": {}, - "_native": "", - "scene": { - "__id__": 1 - } - }, - { - "__type__": "cc.Scene", - "_name": "2D-hit-flash-white", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": null, - "_children": [ - { - "__id__": 2 - } - ], - "_active": true, - "_components": [], - "_prefab": null, - "_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 - }, - "autoReleaseAssets": false, - "_globals": { - "__id__": 35 - }, - "_id": "5e1d3eb2-c300-4627-94c7-2ee03b8314f1" - }, - { - "__type__": "cc.Node", - "_name": "Canvas", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 1 - }, - "_children": [ - { - "__id__": 3 - }, - { - "__id__": 5 - }, - { - "__id__": 8 - }, - { - "__id__": 12 - }, - { - "__id__": 16 - }, - { - "__id__": 20 - }, - { - "__id__": 24 - } - ], - "_active": true, - "_components": [ - { - "__id__": 32 - }, - { - "__id__": 33 - }, - { - "__id__": 34 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 640, - "y": 360.00000000000006, - "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": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "beI88Z2HpFELqR4T5EMHpg" - }, - { - "__type__": "cc.Node", - "_name": "Camera", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 4 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 1000 - }, - "_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": "ebFwiq8gBFaYpqYbdoDODe" - }, - { - "__type__": "cc.Camera", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 3 - }, - "_enabled": true, - "__prefab": null, - "_projection": 0, - "_priority": 0, - "_fov": 45, - "_fovAxis": 0, - "_orthoHeight": 449.9092088197147, - "_near": 0, - "_far": 1000, - "_color": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_depth": 1, - "_stencil": 0, - "_clearFlags": 7, - "_rect": { - "__type__": "cc.Rect", - "x": 0, - "y": 0, - "width": 1, - "height": 1 - }, - "_aperture": 19, - "_shutter": 7, - "_iso": 0, - "_screenScale": 1, - "_visibility": 1108344832, - "_targetTexture": null, - "_postProcess": null, - "_usePostProcess": false, - "_cameraType": -1, - "_trackingType": 0, - "_id": "63WIch3o5BEYRlXzTT0oWc" - }, - { - "__type__": "cc.Node", - "_name": "Bg", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 6 - }, - { - "__id__": 7 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 38.158, - "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": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "984IY2gxlAOJSCE8sgUKHh" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 5 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 1500, - "height": 800 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "b33PMYBwNDnoZaX8jv+ZFA" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 5 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 204, - "g": 204, - "b": 204, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "6edf1d55-6987-46a2-ab03-551f4124be3e@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": "88VBNT15BCoZx3UMR94EG1" - }, - { - "__type__": "cc.Node", - "_name": "Sprite", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 9 - }, - { - "__id__": 10 - }, - { - "__id__": 11 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": -197.704, - "y": -143.199, - "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": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "47cuWuYTZDNqHwOLhCZ+SM" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 8 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 120, - "height": 200 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "d7GMA7U/dLG4N8tq4LxUco" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 8 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "92752fa5-d999-48f7-b1c5-350358701189@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": "4fkJA3Tq1P2Lf42/n1IzcA" - }, - { - "__type__": "d9233/h16dOHobPFFFI9fGn", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 8 - }, - "_enabled": true, - "__prefab": null, - "hitFlashMaterial": { - "__uuid__": "a8f34051-ccff-4050-b9d9-234f62977264", - "__expectedType__": "cc.Material" - }, - "_id": "af9hkq/dRIWK8zM66cWYLm" - }, - { - "__type__": "cc.Node", - "_name": "Sprite-001", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 13 - }, - { - "__id__": 14 - }, - { - "__id__": 15 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 264.609, - "y": -104.921, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 0.6, - "y": 0.6, - "z": 0.6 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "6drcCva8ZDhbENsX9FjGWC" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 12 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 600, - "height": 500 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "8alYuNilxB/6e+bDJ7qytz" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 12 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "83cc6859-79e5-469c-b845-e9febd162daf@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": "76Kkl+3uBOSJ6yXPT8FHjG" - }, - { - "__type__": "d9233/h16dOHobPFFFI9fGn", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 12 - }, - "_enabled": true, - "__prefab": null, - "hitFlashMaterial": { - "__uuid__": "a8f34051-ccff-4050-b9d9-234f62977264", - "__expectedType__": "cc.Material" - }, - "_id": "a6OFEn8C5BYLARqGmaayJC" - }, - { - "__type__": "cc.Node", - "_name": "Sprite-002", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 17 - }, - { - "__id__": 18 - }, - { - "__id__": 19 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": -294.976, - "y": -25.589, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 0.6, - "y": 0.6, - "z": 0.6 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "7cZJzv11tKMKx7UKmN7PYn" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 16 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 120 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "7aFHVGh1RI142n7gcGFH3U" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 16 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "d5e44836-49d0-4503-a0d8-2e2a4f7debd6@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": "abRd5eu9BBcKXZhvmt1pnh" - }, - { - "__type__": "d9233/h16dOHobPFFFI9fGn", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 16 - }, - "_enabled": true, - "__prefab": null, - "hitFlashMaterial": { - "__uuid__": "a8f34051-ccff-4050-b9d9-234f62977264", - "__expectedType__": "cc.Material" - }, - "_id": "9far8e04RH7I6Cv5YBRjUX" - }, - { - "__type__": "cc.Node", - "_name": "Sprite-003", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 21 - }, - { - "__id__": 22 - }, - { - "__id__": 23 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": -310.482, - "y": -214.014, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 0.6, - "y": 0.6, - "z": 0.6 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "a9awv5R2hETa/jQcZT6LQv" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 20 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 120, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "05irYaj4lHersoOQgEX4Tm" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 20 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "6c4dbd2d-3d0b-4b15-927e-e1ef95c31caa@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": "63XQOZ/kZKjoWgRTjMt3H9" - }, - { - "__type__": "d9233/h16dOHobPFFFI9fGn", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 20 - }, - "_enabled": true, - "__prefab": null, - "hitFlashMaterial": { - "__uuid__": "a8f34051-ccff-4050-b9d9-234f62977264", - "__expectedType__": "cc.Material" - }, - "_id": "f4QaJbnz1JIatPp1up/5ig" - }, - { - "__type__": "cc.Node", - "_name": "Button", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 2 - }, - "_children": [ - { - "__id__": 25 - } - ], - "_active": true, - "_components": [ - { - "__id__": 28 - }, - { - "__id__": 29 - }, - { - "__id__": 30 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 263, - "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": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "70Y/G/NkdCLqyMSRayLQ6d" - }, - { - "__type__": "cc.Node", - "_name": "Label", - "_objFlags": 512, - "__editorExtras__": {}, - "_parent": { - "__id__": 24 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 26 - }, - { - "__id__": 27 - } - ], - "_prefab": null, - "_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": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "ceDUmMd0FK95Js2SanW8fU" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 25 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 40 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "7bYgUbyNhALbAc8O7fDwfF" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 25 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_string": "Click", - "_horizontalAlign": 1, - "_verticalAlign": 1, - "_actualFontSize": 24.09375, - "_fontSize": 20, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 1, - "_enableWrapText": false, - "_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": "320fPIz4BBg4yItbvc3KJO" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 24 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 40 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "c5CEOO8bpFd4i07XuGManc" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 24 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 1, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "03lEccfZpM0Id//+Wr4rih" - }, - { - "__type__": "cc.Button", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 24 - }, - "_enabled": true, - "__prefab": null, - "clickEvents": [ - { - "__id__": 31 - } - ], - "_interactable": true, - "_transition": 2, - "_normalColor": { - "__type__": "cc.Color", - "r": 214, - "g": 214, - "b": 214, - "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": { - "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_hoverSprite": { - "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_pressedSprite": { - "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_disabledSprite": { - "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_duration": 0.1, - "_zoomScale": 1.2, - "_target": { - "__id__": 24 - }, - "_id": "ceer4hT0BDJKzVNgil1Bmt" - }, - { - "__type__": "cc.ClickEvent", - "target": { - "__id__": 12 - }, - "component": "", - "_componentId": "d9233/h16dOHobPFFFI9fGn", - "handler": "clickFlash", - "customEventData": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 2 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 1280, - "height": 720 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "d6rUX5yfhMlKoWX2bSbawx" - }, - { - "__type__": "cc.Canvas", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 2 - }, - "_enabled": true, - "__prefab": null, - "_cameraComponent": { - "__id__": 4 - }, - "_alignCanvasWithScreen": true, - "_id": "12O/ljcVlEqLmVm3U2gEOQ" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 2 - }, - "_enabled": true, - "__prefab": null, - "_alignFlags": 45, - "_target": null, - "_left": 0, - "_right": 0, - "_top": 5.684341886080802e-14, - "_bottom": 5.684341886080802e-14, - "_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": "c5V1EV8IpMtrIvY1OE9t2u" - }, - { - "__type__": "cc.SceneGlobals", - "ambient": { - "__id__": 36 - }, - "shadows": { - "__id__": 37 - }, - "_skybox": { - "__id__": 38 - }, - "fog": { - "__id__": 39 - }, - "octree": { - "__id__": 40 - }, - "skin": { - "__id__": 41 - }, - "lightProbeInfo": { - "__id__": 42 - }, - "postSettings": { - "__id__": 43 - }, - "bakedWithStationaryMainLight": false, - "bakedWithHighpLightmap": false - }, - { - "__type__": "cc.AmbientInfo", - "_skyColorHDR": { - "__type__": "cc.Vec4", - "x": 0, - "y": 0, - "z": 0, - "w": 0.520833125 - }, - "_skyColor": { - "__type__": "cc.Vec4", - "x": 0, - "y": 0, - "z": 0, - "w": 0.520833125 - }, - "_skyIllumHDR": 20000, - "_skyIllum": 20000, - "_groundAlbedoHDR": { - "__type__": "cc.Vec4", - "x": 0, - "y": 0, - "z": 0, - "w": 0 - }, - "_groundAlbedo": { - "__type__": "cc.Vec4", - "x": 0, - "y": 0, - "z": 0, - "w": 0 - }, - "_skyColorLDR": { - "__type__": "cc.Vec4", - "x": 0.2, - "y": 0.5, - "z": 0.8, - "w": 1 - }, - "_skyIllumLDR": 20000, - "_groundAlbedoLDR": { - "__type__": "cc.Vec4", - "x": 0.2, - "y": 0.2, - "z": 0.2, - "w": 1 - } - }, - { - "__type__": "cc.ShadowsInfo", - "_enabled": false, - "_type": 0, - "_normal": { - "__type__": "cc.Vec3", - "x": 0, - "y": 1, - "z": 0 - }, - "_distance": 0, - "_planeBias": 1, - "_shadowColor": { - "__type__": "cc.Color", - "r": 76, - "g": 76, - "b": 76, - "a": 255 - }, - "_maxReceived": 4, - "_size": { - "__type__": "cc.Vec2", - "x": 512, - "y": 512 - } - }, - { - "__type__": "cc.SkyboxInfo", - "_envLightingType": 0, - "_envmapHDR": null, - "_envmap": null, - "_envmapLDR": null, - "_diffuseMapHDR": null, - "_diffuseMapLDR": null, - "_enabled": false, - "_useHDR": true, - "_editableMaterial": null, - "_reflectionHDR": null, - "_reflectionLDR": null, - "_rotationAngle": 0 - }, - { - "__type__": "cc.FogInfo", - "_type": 0, - "_fogColor": { - "__type__": "cc.Color", - "r": 200, - "g": 200, - "b": 200, - "a": 255 - }, - "_enabled": false, - "_fogDensity": 0.3, - "_fogStart": 0.5, - "_fogEnd": 300, - "_fogAtten": 5, - "_fogTop": 1.5, - "_fogRange": 1.2, - "_accurate": false - }, - { - "__type__": "cc.OctreeInfo", - "_enabled": false, - "_minPos": { - "__type__": "cc.Vec3", - "x": -1024, - "y": -1024, - "z": -1024 - }, - "_maxPos": { - "__type__": "cc.Vec3", - "x": 1024, - "y": 1024, - "z": 1024 - }, - "_depth": 8 - }, - { - "__type__": "cc.SkinInfo", - "_enabled": false, - "_blurRadius": 0.01, - "_sssIntensity": 3 - }, - { - "__type__": "cc.LightProbeInfo", - "_giScale": 1, - "_giSamples": 1024, - "_bounces": 2, - "_reduceRinging": 0, - "_showProbe": true, - "_showWireframe": true, - "_showConvex": false, - "_data": null, - "_lightProbeSphereVolume": 1 - }, - { - "__type__": "cc.PostSettingsInfo", - "_toneMappingType": 0 - } -] \ No newline at end of file diff --git a/assets/script/game/hero/hit-flash-white/scenes/2D-hit-flash-white.scene.meta b/assets/script/game/hero/hit-flash-white/scenes/2D-hit-flash-white.scene.meta deleted file mode 100644 index 821fe15c..00000000 --- a/assets/script/game/hero/hit-flash-white/scenes/2D-hit-flash-white.scene.meta +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ver": "1.1.50", - "importer": "scene", - "imported": true, - "uuid": "5e1d3eb2-c300-4627-94c7-2ee03b8314f1", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/map/CardComp.ts b/assets/script/game/map/CardComp.ts index a6a680c8..fe53d0d7 100644 --- a/assets/script/game/map/CardComp.ts +++ b/assets/script/game/map/CardComp.ts @@ -277,22 +277,22 @@ export class CardComp extends CCComp { /** 绑定触控:卡面点击使用,锁按钮点击切换锁定 */ private bindEvents() { - this.node.on(NodeEventType.TOUCH_START, this.onCardTouchStart, this); - this.node.on(NodeEventType.TOUCH_MOVE, this.onCardTouchMove, this); - this.node.on(NodeEventType.TOUCH_END, this.onCardTouchEnd, this); - this.node.on(NodeEventType.TOUCH_CANCEL, this.onCardTouchCancel, this); - this.Lock?.on(NodeEventType.TOUCH_END, this.onToggleLock, this); - this.unLock?.on(NodeEventType.TOUCH_END, this.onToggleLock, this); + // this.node.on(NodeEventType.TOUCH_START, this.onCardTouchStart, this); + // this.node.on(NodeEventType.TOUCH_MOVE, this.onCardTouchMove, this); + // this.node.on(NodeEventType.TOUCH_END, this.onCardTouchEnd, this); + // this.node.on(NodeEventType.TOUCH_CANCEL, this.onCardTouchCancel, this); + // this.Lock?.on(NodeEventType.TOUCH_END, this.onToggleLock, this); + // this.unLock?.on(NodeEventType.TOUCH_END, this.onToggleLock, this); } /** 解绑触控,防止节点销毁后残留回调 */ private unbindEvents() { - this.node.off(NodeEventType.TOUCH_START, this.onCardTouchStart, this); - this.node.off(NodeEventType.TOUCH_MOVE, this.onCardTouchMove, this); - this.node.off(NodeEventType.TOUCH_END, this.onCardTouchEnd, this); - this.node.off(NodeEventType.TOUCH_CANCEL, this.onCardTouchCancel, this); - this.Lock?.off(NodeEventType.TOUCH_END, this.onToggleLock, this); - this.unLock?.off(NodeEventType.TOUCH_END, this.onToggleLock, this); + // this.node.off(NodeEventType.TOUCH_START, this.onCardTouchStart, this); + // this.node.off(NodeEventType.TOUCH_MOVE, this.onCardTouchMove, this); + // this.node.off(NodeEventType.TOUCH_END, this.onCardTouchEnd, this); + // this.node.off(NodeEventType.TOUCH_CANCEL, this.onCardTouchCancel, this); + // this.Lock?.off(NodeEventType.TOUCH_END, this.onToggleLock, this); + // this.unLock?.off(NodeEventType.TOUCH_END, this.onToggleLock, this); } private onCardTouchStart(event: EventTouch) { diff --git a/assets/script/game/map/HInfoComp.ts b/assets/script/game/map/HInfoComp.ts index 97683d42..3be919ca 100644 --- a/assets/script/game/map/HInfoComp.ts +++ b/assets/script/game/map/HInfoComp.ts @@ -1,10 +1,12 @@ -import { _decorator, Animation, AnimationClip, Label, Node, NodeEventType, Sprite, resources } from "cc"; +import { _decorator, Animation, AnimationClip, Button, Event, Label, Node, NodeEventType, Sprite, resources } from "cc"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { HeroInfo } from "../common/config/heroSet"; import { HeroAttrsComp } from "../hero/HeroAttrsComp"; +import { Hero } from "../hero/Hero"; import { oops } from "db://oops-framework/core/Oops"; import { UIID } from "../common/config/GameUIConfig"; +import { mLogger } from "../common/Logger"; const {property, ccclass } = _decorator; @@ -22,14 +24,14 @@ export class HInfoComp extends CCComp { private hpLabel: Label | null = null; private iconVisualToken: number = 0; private iconHeroUuid: number = 0; - + private debugMode: boolean = true; onLoad() { this.cacheLabels(); - this.bindEvents(); + // this.bindEvents(); } onDestroy() { - this.unbindEvents(); + // this.unbindEvents(); } bindData(eid: number, model: HeroAttrsComp) { @@ -125,16 +127,19 @@ export class HInfoComp extends CCComp { [...clips].forEach(clip => anim.removeClip(clip, true)); } - private bindEvents() { - this.node.on(NodeEventType.TOUCH_END, this.onOpenIBox, this); - } + // private bindEvents() { + // this.sell_node?.on(Button.EventType.CLICK, this.onSellHero, this); + // this.node.on(NodeEventType.TOUCH_END, this.onOpenIBox, this); + // } - private unbindEvents() { - this.node.off(NodeEventType.TOUCH_END, this.onOpenIBox, this); - } + // private unbindEvents() { + // this.sell_node?.off(Button.EventType.CLICK, this.onSellHero, this); + // this.node.off(NodeEventType.TOUCH_END, this.onOpenIBox, this); + // } private onOpenIBox() { if (!this.model) return; + if (!this.isModelAlive()) return; const heroUuid = this.model.hero_uuid ?? 0; if (!heroUuid || !HeroInfo[heroUuid]) return; const heroLv = Math.max(1, Math.floor(this.model.lv ?? 1)); @@ -146,6 +151,18 @@ export class HInfoComp extends CCComp { }); } + private onSellHero(event?: Event) { + if (!this.eid) return; + const removed = Hero.removeByEid(this.eid); + mLogger.log(this.debugMode, "HInfoComp", "onSellHero", { + eid: this.eid, + isAlive: this.isModelAlive(), + removed + }); + if (!removed) return; + oops.gui.remove(UIID.IBox); + } + /** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */ reset() { this.clearIconAnimation(this.icon_node);