fix(hero): 修复死亡状态下仍处理伤害队列的问题

调整伤害队列处理顺序,确保在英雄死亡后不再显示伤害数字。同时删除未使用的天赋系统文档。
This commit is contained in:
walkpan
2026-03-23 20:45:54 +08:00
parent 849a8aeaef
commit 32fa7a4163
3 changed files with 75 additions and 98 deletions

View File

@@ -221,7 +221,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -26.2975, "x": -57.36234375000001,
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
@@ -262,8 +262,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 11.67, "width": 14.3251953125,
"height": 45 "height": 43.8
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -301,17 +301,14 @@
"_string": "-", "_string": "-",
"_horizontalAlign": 2, "_horizontalAlign": 2,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 40, "_actualFontSize": 25,
"_fontSize": 40, "_fontSize": 25,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 45, "_lineHeight": 30,
"_overflow": 0, "_overflow": 0,
"_enableWrapText": true, "_enableWrapText": true,
"_font": { "_font": null,
"__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", "_isSystemFontUsed": true,
"__expectedType__": "cc.BitmapFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
"_isItalic": false, "_isItalic": false,
"_isBold": true, "_isBold": true,
@@ -326,7 +323,7 @@
"b": 0, "b": 0,
"a": 255 "a": 255
}, },
"_outlineWidth": 2, "_outlineWidth": 1,
"_enableShadow": false, "_enableShadow": false,
"_shadowColor": { "_shadowColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
@@ -361,7 +358,7 @@
}, },
"_alignFlags": 8, "_alignFlags": 8,
"_target": null, "_target": null,
"_left": -16.0225, "_left": -14.52494140625,
"_right": 0, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": 0, "_bottom": 0,
@@ -410,8 +407,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 32.22, "width": 100,
"height": 45 "height": 64.10000000000001
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -447,34 +444,31 @@
"a": 255 "a": 255
}, },
"_string": "10", "_string": "10",
"_horizontalAlign": 1, "_horizontalAlign": 0,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 40, "_actualFontSize": 26,
"_fontSize": 40, "_fontSize": 25,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 45, "_lineHeight": 30,
"_overflow": 0, "_overflow": 2,
"_enableWrapText": true, "_enableWrapText": true,
"_font": { "_font": null,
"__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", "_isSystemFontUsed": true,
"__expectedType__": "cc.BitmapFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
"_isItalic": false, "_isItalic": false,
"_isBold": false, "_isBold": true,
"_isUnderline": false, "_isUnderline": false,
"_underlineHeight": 2, "_underlineHeight": 2,
"_cacheMode": 0, "_cacheMode": 0,
"_enableOutline": true, "_enableOutline": true,
"_outlineColor": { "_outlineColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 75, "r": 0,
"g": 75, "g": 0,
"b": 75, "b": 0,
"a": 255 "a": 255
}, },
"_outlineWidth": 2, "_outlineWidth": 1,
"_enableShadow": false, "_enableShadow": false,
"_shadowColor": { "_shadowColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
@@ -680,7 +674,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -36.930390625, "x": -62.581,
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
@@ -760,17 +754,14 @@
"_string": "+", "_string": "+",
"_horizontalAlign": 1, "_horizontalAlign": 1,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 50, "_actualFontSize": 26,
"_fontSize": 50, "_fontSize": 25,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 50, "_lineHeight": 30,
"_overflow": 2, "_overflow": 2,
"_enableWrapText": true, "_enableWrapText": true,
"_font": { "_font": null,
"__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", "_isSystemFontUsed": true,
"__expectedType__": "cc.BitmapFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
"_isItalic": false, "_isItalic": false,
"_isBold": true, "_isBold": true,
@@ -785,7 +776,7 @@
"b": 0, "b": 0,
"a": 255 "a": 255
}, },
"_outlineWidth": 2, "_outlineWidth": 1,
"_enableShadow": false, "_enableShadow": false,
"_shadowColor": { "_shadowColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
@@ -820,7 +811,7 @@
}, },
"_alignFlags": 8, "_alignFlags": 8,
"_target": null, "_target": null,
"_left": -26.875, "_left": -27.180609375000003,
"_right": 0, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": 0, "_bottom": 0,
@@ -869,8 +860,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 49.31, "width": 100,
"height": 50 "height": 65
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -906,22 +897,19 @@
"a": 255 "a": 255
}, },
"_string": "50", "_string": "50",
"_horizontalAlign": 1, "_horizontalAlign": 0,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 50, "_actualFontSize": 26,
"_fontSize": 50, "_fontSize": 25,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 50, "_lineHeight": 30,
"_overflow": 0, "_overflow": 2,
"_enableWrapText": true, "_enableWrapText": true,
"_font": { "_font": null,
"__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", "_isSystemFontUsed": true,
"__expectedType__": "cc.BitmapFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
"_isItalic": false, "_isItalic": false,
"_isBold": false, "_isBold": true,
"_isUnderline": false, "_isUnderline": false,
"_underlineHeight": 2, "_underlineHeight": 2,
"_cacheMode": 0, "_cacheMode": 0,
@@ -1021,7 +1009,7 @@
"__id__": 39 "__id__": 39
} }
], ],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 61 "__id__": 61
@@ -1142,8 +1130,8 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -50.342000000000006, "x": -68.97900000000001,
"y": 6.053, "y": 0.597,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -1259,7 +1247,7 @@
}, },
"_alignFlags": 8, "_alignFlags": 8,
"_target": null, "_target": null,
"_left": -42.357, "_left": -40.579,
"_right": 0, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": 0, "_bottom": 0,
@@ -1303,7 +1291,7 @@
"__id__": 39 "__id__": 39
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 49 "__id__": 49
@@ -1320,7 +1308,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -50.397, "x": -71.73,
"y": 0.963, "y": 0.963,
"z": 0 "z": 0
}, },
@@ -1361,8 +1349,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 17.5, "width": 25.98046875,
"height": 60 "height": 81.6
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -1406,11 +1394,8 @@
"_lineHeight": 60, "_lineHeight": 60,
"_overflow": 0, "_overflow": 0,
"_enableWrapText": true, "_enableWrapText": true,
"_font": { "_font": null,
"__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", "_isSystemFontUsed": true,
"__expectedType__": "cc.BitmapFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
"_isItalic": false, "_isItalic": false,
"_isBold": true, "_isBold": true,
@@ -1420,12 +1405,12 @@
"_enableOutline": true, "_enableOutline": true,
"_outlineColor": { "_outlineColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 255, "r": 0,
"g": 255, "g": 0,
"b": 255, "b": 0,
"a": 255 "a": 255
}, },
"_outlineWidth": 2, "_outlineWidth": 3,
"_enableShadow": false, "_enableShadow": false,
"_shadowColor": { "_shadowColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
@@ -1460,7 +1445,7 @@
}, },
"_alignFlags": 8, "_alignFlags": 8,
"_target": null, "_target": null,
"_left": -29.561999999999998, "_left": -34.720234375000004,
"_right": 0, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": 0, "_bottom": 0,
@@ -1509,8 +1494,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 59.17, "width": 100,
"height": 60 "height": 79.6
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -1545,35 +1530,32 @@
"b": 0, "b": 0,
"a": 255 "a": 255
}, },
"_string": "80", "_string": "999",
"_horizontalAlign": 1, "_horizontalAlign": 0,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 60, "_actualFontSize": 31,
"_fontSize": 60, "_fontSize": 30,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 60, "_lineHeight": 35,
"_overflow": 0, "_overflow": 2,
"_enableWrapText": true, "_enableWrapText": true,
"_font": { "_font": null,
"__uuid__": "983a109b-a5e3-4ba7-84c5-1c53817ba177", "_isSystemFontUsed": true,
"__expectedType__": "cc.BitmapFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
"_isItalic": false, "_isItalic": false,
"_isBold": false, "_isBold": true,
"_isUnderline": false, "_isUnderline": false,
"_underlineHeight": 2, "_underlineHeight": 2,
"_cacheMode": 0, "_cacheMode": 0,
"_enableOutline": true, "_enableOutline": true,
"_outlineColor": { "_outlineColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 255, "r": 0,
"g": 255, "g": 0,
"b": 255, "b": 0,
"a": 255 "a": 255
}, },
"_outlineWidth": 2, "_outlineWidth": 1,
"_enableShadow": false, "_enableShadow": false,
"_shadowColor": { "_shadowColor": {
"__type__": "cc.Color", "__type__": "cc.Color",

View File

@@ -1,5 +0,0 @@
天赋系统:
攻击,受攻击,治疗量,伤害量等触发天赋点数,天赋点数可以用于技能伤害加成,触发特殊特殊百分比加成:攻击,防御,生命值,冰冻几率,暴击率等
伤害加成例1技能伤害加成总天赋点数/10
属性加成例2每获得2点天赋点增加5攻击
属性加成例3每获得2点天赋点增加6攻击消耗1点天赋点数

View File

@@ -138,6 +138,9 @@ export class HeroViewComp extends CCComp {
// 🔥 修复添加安全检查防止在实体销毁过程中访问null的model // 🔥 修复添加安全检查防止在实体销毁过程中访问null的model
if(!this.ent) return; if(!this.ent) return;
if (!this.model) return; if (!this.model) return;
this.processDamageQueue();
if(this.model.is_dead){ if(this.model.is_dead){
this.deadCD+=dt this.deadCD+=dt
if(this.deadCD>=this.realDeadTime){ if(this.deadCD>=this.realDeadTime){
@@ -147,9 +150,6 @@ export class HeroViewComp extends CCComp {
return return
} ; } ;
// ✅ View 层职责:处理表现相关的逻辑
this.processDamageQueue(); // 伤害数字显示队列
// ✅ 按需更新 UI脏标签模式- 只在属性变化时更新 // ✅ 按需更新 UI脏标签模式- 只在属性变化时更新
if (this.model.dirty_hp) { if (this.model.dirty_hp) {
this.hp_show(); this.hp_show();