refactor(skill): 重构技能命中次数管理逻辑
- 在 SDataCom 组件中添加 max_hit_count 字段,用于存储最大可命中次数 - 移除 SkillView 中基于攻击帧的计数逻辑,改为使用 sData.max_hit_count 管理 - 在技能初始化时计算 max_hit_count(基础命中数 + 穿刺属性) - 更新技能配置注释,将 hit_num 重命名为 hit_count 以保持命名一致性
This commit is contained in:
@@ -16,6 +16,7 @@ export class SDataCom extends ecs.Comp {
|
||||
ext_dmg:number=0 //额外伤害
|
||||
dmg_ratio:number=1 //伤害比例
|
||||
hit_count:number=0 //击中数量
|
||||
max_hit_count:number=0 //最大可命中次数
|
||||
reset() {
|
||||
this.Attrs=null
|
||||
this.group=BoxSet.HERO
|
||||
@@ -24,6 +25,7 @@ export class SDataCom extends ecs.Comp {
|
||||
this.caster=null
|
||||
this.casterEid = -1;
|
||||
this.hit_count=0
|
||||
this.max_hit_count=0
|
||||
this.ext_dmg=0
|
||||
this.dmg_ratio=1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user