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

@@ -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();