refactor(战斗): 重构英雄与怪物属性系统,简化数据结构
- 移除 HeroSkillsComp 组件,将技能逻辑合并到 HeroAttrsComp - 将属性从 Attrs 枚举映射改为 HeroAttrsComp 中的独立字段 - 为 HeroAttrsComp 添加攻击和技能冷却时间管理功能 - 统一英雄和怪物的属性初始化方式,简化配置数据 - 在 GameSet 中添加击退概率配置项 - 修复 SkillView 中属性名大小写错误
This commit is contained in:
@@ -183,7 +183,7 @@ export class SkillView extends CCComp {
|
||||
this.sData.hit_count++
|
||||
// 检查技能是否应该销毁
|
||||
if (
|
||||
this.sData.hit_count >= (this.SConf.hit + this.sData.Attrs[Attrs.PUNCTURE]) &&
|
||||
this.sData.hit_count >= (this.SConf.hit + this.sData.Attrs[Attrs.puncture]) &&
|
||||
(this.SConf.DTType != DTType.range) &&
|
||||
(this.SConf.EType != EType.animationEnd) &&
|
||||
(this.SConf.EType != EType.timeEnd)
|
||||
|
||||
Reference in New Issue
Block a user