fix(hero): 修复死亡状态下仍处理伤害队列的问题
调整伤害队列处理顺序,确保在英雄死亡后不再显示伤害数字。同时删除未使用的天赋系统文档。
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
天赋系统:
|
||||
攻击,受攻击,治疗量,伤害量等触发天赋点数,天赋点数可以用于技能伤害加成,触发特殊特殊百分比加成:攻击,防御,生命值,冰冻几率,暴击率等
|
||||
伤害加成例1:技能伤害加成(总天赋点数/10)
|
||||
属性加成例2:每获得2点天赋点增加5攻击
|
||||
属性加成例3:每获得2点天赋点增加6攻击,消耗1点天赋点数
|
||||
@@ -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