From 32fa7a416304d4f2a60d6bb391563f660ff32021 Mon Sep 17 00:00:00 2001 From: walkpan Date: Mon, 23 Mar 2026 20:45:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(hero):=20=E4=BF=AE=E5=A4=8D=E6=AD=BB?= =?UTF-8?q?=E4=BA=A1=E7=8A=B6=E6=80=81=E4=B8=8B=E4=BB=8D=E5=A4=84=E7=90=86?= =?UTF-8?q?=E4=BC=A4=E5=AE=B3=E9=98=9F=E5=88=97=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整伤害队列处理顺序,确保在英雄死亡后不再显示伤害数字。同时删除未使用的天赋系统文档。 --- .../resources/game/skill/buff/tooltip.prefab | 162 ++++++++---------- assets/script/game/common/config/taldev.md | 5 - assets/script/game/hero/HeroViewComp.ts | 6 +- 3 files changed, 75 insertions(+), 98 deletions(-) delete mode 100644 assets/script/game/common/config/taldev.md diff --git a/assets/resources/game/skill/buff/tooltip.prefab b/assets/resources/game/skill/buff/tooltip.prefab index d3c6812e..b53a7024 100644 --- a/assets/resources/game/skill/buff/tooltip.prefab +++ b/assets/resources/game/skill/buff/tooltip.prefab @@ -221,7 +221,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -26.2975, + "x": -57.36234375000001, "y": 0, "z": 0 }, @@ -262,8 +262,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 11.67, - "height": 45 + "width": 14.3251953125, + "height": 43.8 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -301,17 +301,14 @@ "_string": "-", "_horizontalAlign": 2, "_verticalAlign": 1, - "_actualFontSize": 40, - "_fontSize": 40, + "_actualFontSize": 25, + "_fontSize": 25, "_fontFamily": "Arial", - "_lineHeight": 45, + "_lineHeight": 30, "_overflow": 0, "_enableWrapText": true, - "_font": { - "__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", - "__expectedType__": "cc.BitmapFont" - }, - "_isSystemFontUsed": false, + "_font": null, + "_isSystemFontUsed": true, "_spacingX": 0, "_isItalic": false, "_isBold": true, @@ -326,7 +323,7 @@ "b": 0, "a": 255 }, - "_outlineWidth": 2, + "_outlineWidth": 1, "_enableShadow": false, "_shadowColor": { "__type__": "cc.Color", @@ -361,7 +358,7 @@ }, "_alignFlags": 8, "_target": null, - "_left": -16.0225, + "_left": -14.52494140625, "_right": 0, "_top": 0, "_bottom": 0, @@ -410,8 +407,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 32.22, - "height": 45 + "width": 100, + "height": 64.10000000000001 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -447,34 +444,31 @@ "a": 255 }, "_string": "10", - "_horizontalAlign": 1, + "_horizontalAlign": 0, "_verticalAlign": 1, - "_actualFontSize": 40, - "_fontSize": 40, + "_actualFontSize": 26, + "_fontSize": 25, "_fontFamily": "Arial", - "_lineHeight": 45, - "_overflow": 0, + "_lineHeight": 30, + "_overflow": 2, "_enableWrapText": true, - "_font": { - "__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", - "__expectedType__": "cc.BitmapFont" - }, - "_isSystemFontUsed": false, + "_font": null, + "_isSystemFontUsed": true, "_spacingX": 0, "_isItalic": false, - "_isBold": false, + "_isBold": true, "_isUnderline": false, "_underlineHeight": 2, "_cacheMode": 0, "_enableOutline": true, "_outlineColor": { "__type__": "cc.Color", - "r": 75, - "g": 75, - "b": 75, + "r": 0, + "g": 0, + "b": 0, "a": 255 }, - "_outlineWidth": 2, + "_outlineWidth": 1, "_enableShadow": false, "_shadowColor": { "__type__": "cc.Color", @@ -680,7 +674,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -36.930390625, + "x": -62.581, "y": 0, "z": 0 }, @@ -760,17 +754,14 @@ "_string": "+", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 50, - "_fontSize": 50, + "_actualFontSize": 26, + "_fontSize": 25, "_fontFamily": "Arial", - "_lineHeight": 50, + "_lineHeight": 30, "_overflow": 2, "_enableWrapText": true, - "_font": { - "__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", - "__expectedType__": "cc.BitmapFont" - }, - "_isSystemFontUsed": false, + "_font": null, + "_isSystemFontUsed": true, "_spacingX": 0, "_isItalic": false, "_isBold": true, @@ -785,7 +776,7 @@ "b": 0, "a": 255 }, - "_outlineWidth": 2, + "_outlineWidth": 1, "_enableShadow": false, "_shadowColor": { "__type__": "cc.Color", @@ -820,7 +811,7 @@ }, "_alignFlags": 8, "_target": null, - "_left": -26.875, + "_left": -27.180609375000003, "_right": 0, "_top": 0, "_bottom": 0, @@ -869,8 +860,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 49.31, - "height": 50 + "width": 100, + "height": 65 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -906,22 +897,19 @@ "a": 255 }, "_string": "50", - "_horizontalAlign": 1, + "_horizontalAlign": 0, "_verticalAlign": 1, - "_actualFontSize": 50, - "_fontSize": 50, + "_actualFontSize": 26, + "_fontSize": 25, "_fontFamily": "Arial", - "_lineHeight": 50, - "_overflow": 0, + "_lineHeight": 30, + "_overflow": 2, "_enableWrapText": true, - "_font": { - "__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", - "__expectedType__": "cc.BitmapFont" - }, - "_isSystemFontUsed": false, + "_font": null, + "_isSystemFontUsed": true, "_spacingX": 0, "_isItalic": false, - "_isBold": false, + "_isBold": true, "_isUnderline": false, "_underlineHeight": 2, "_cacheMode": 0, @@ -1021,7 +1009,7 @@ "__id__": 39 } ], - "_active": false, + "_active": true, "_components": [ { "__id__": 61 @@ -1142,8 +1130,8 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -50.342000000000006, - "y": 6.053, + "x": -68.97900000000001, + "y": 0.597, "z": 0 }, "_lrot": { @@ -1259,7 +1247,7 @@ }, "_alignFlags": 8, "_target": null, - "_left": -42.357, + "_left": -40.579, "_right": 0, "_top": 0, "_bottom": 0, @@ -1303,7 +1291,7 @@ "__id__": 39 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 49 @@ -1320,7 +1308,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -50.397, + "x": -71.73, "y": 0.963, "z": 0 }, @@ -1361,8 +1349,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 17.5, - "height": 60 + "width": 25.98046875, + "height": 81.6 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1406,11 +1394,8 @@ "_lineHeight": 60, "_overflow": 0, "_enableWrapText": true, - "_font": { - "__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", - "__expectedType__": "cc.BitmapFont" - }, - "_isSystemFontUsed": false, + "_font": null, + "_isSystemFontUsed": true, "_spacingX": 0, "_isItalic": false, "_isBold": true, @@ -1420,12 +1405,12 @@ "_enableOutline": true, "_outlineColor": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, + "r": 0, + "g": 0, + "b": 0, "a": 255 }, - "_outlineWidth": 2, + "_outlineWidth": 3, "_enableShadow": false, "_shadowColor": { "__type__": "cc.Color", @@ -1460,7 +1445,7 @@ }, "_alignFlags": 8, "_target": null, - "_left": -29.561999999999998, + "_left": -34.720234375000004, "_right": 0, "_top": 0, "_bottom": 0, @@ -1509,8 +1494,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 59.17, - "height": 60 + "width": 100, + "height": 79.6 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1545,35 +1530,32 @@ "b": 0, "a": 255 }, - "_string": "80", - "_horizontalAlign": 1, + "_string": "999", + "_horizontalAlign": 0, "_verticalAlign": 1, - "_actualFontSize": 60, - "_fontSize": 60, + "_actualFontSize": 31, + "_fontSize": 30, "_fontFamily": "Arial", - "_lineHeight": 60, - "_overflow": 0, + "_lineHeight": 35, + "_overflow": 2, "_enableWrapText": true, - "_font": { - "__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", - "__expectedType__": "cc.BitmapFont" - }, - "_isSystemFontUsed": false, + "_font": null, + "_isSystemFontUsed": true, "_spacingX": 0, "_isItalic": false, - "_isBold": false, + "_isBold": true, "_isUnderline": false, "_underlineHeight": 2, "_cacheMode": 0, "_enableOutline": true, "_outlineColor": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, + "r": 0, + "g": 0, + "b": 0, "a": 255 }, - "_outlineWidth": 2, + "_outlineWidth": 1, "_enableShadow": false, "_shadowColor": { "__type__": "cc.Color", diff --git a/assets/script/game/common/config/taldev.md b/assets/script/game/common/config/taldev.md deleted file mode 100644 index 1c5921bc..00000000 --- a/assets/script/game/common/config/taldev.md +++ /dev/null @@ -1,5 +0,0 @@ -天赋系统: -攻击,受攻击,治疗量,伤害量等触发天赋点数,天赋点数可以用于技能伤害加成,触发特殊特殊百分比加成:攻击,防御,生命值,冰冻几率,暴击率等 -伤害加成例1:技能伤害加成(总天赋点数/10) -属性加成例2:每获得2点天赋点增加5攻击 -属性加成例3:每获得2点天赋点增加6攻击,消耗1点天赋点数 diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index e1570777..9effe08b 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -138,6 +138,9 @@ export class HeroViewComp extends CCComp { // 🔥 修复:添加安全检查,防止在实体销毁过程中访问null的model if(!this.ent) return; if (!this.model) return; + + this.processDamageQueue(); + if(this.model.is_dead){ this.deadCD+=dt if(this.deadCD>=this.realDeadTime){ @@ -147,9 +150,6 @@ export class HeroViewComp extends CCComp { return } ; - // ✅ View 层职责:处理表现相关的逻辑 - this.processDamageQueue(); // 伤害数字显示队列 - // ✅ 按需更新 UI(脏标签模式)- 只在属性变化时更新 if (this.model.dirty_hp) { this.hp_show();