fix(hero): 修复死亡状态下仍处理伤害队列的问题
调整伤害队列处理顺序,确保在英雄死亡后不再显示伤害数字。同时删除未使用的天赋系统文档。
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user