feat(英雄系统): 添加击杀计数并优化攻击系统变量命名

添加英雄击杀计数功能,用于统计英雄击杀敌人数量
优化HeroAtkSystem中变量命名,将attackerTAttrsComp改为更清晰的CAttrsComp
修复荆棘伤害可能导致英雄死亡时未触发死亡表现的问题
This commit is contained in:
panw
2025-11-27 16:31:22 +08:00
parent b2cc25b32b
commit 40c430546c
2 changed files with 18 additions and 5 deletions

View File

@@ -65,7 +65,7 @@ export class HeroAttrsComp extends ecs.Comp {
// ==================== 计数统计 ====================
atk_count: number = 0; // 攻击次数
atked_count: number = 0; // 被攻击次数
killed_count:number=0;
// 注意:技能数据已迁移到 HeroSkillsComp不再存储在这里
start(){
@@ -561,6 +561,7 @@ export class HeroAttrsComp extends ecs.Comp {
this.is_kalami = false;
this.atk_count = 0;
this.atked_count = 0;
this.killed_count =0;
}