refactor: 重构技能系统并移除自动施法模块

- 删除 SACastSystem 及其 meta 文件,移除自动施法逻辑
- 重构 HeroAttrsComp 中的 Buff 处理逻辑,修复百分比计算问题
  - 将治疗和护盾 Buff 的 BType 从 VALUE 改为 RATIO
  - 添加 resolveBuffValue 方法正确计算基于最大生命值的百分比值
  - 修复 applyAttrChange 中 RATIO 类型的叠加逻辑
- 添加 HeroBuffSystem 系统,将 Buff 更新逻辑从 HeroAttrsComp 中分离
- 优化 SkillView 的销毁逻辑,避免直接调用 destroy 方法
  - 禁用碰撞体并设置节点为 inactive 状态
This commit is contained in:
panw
2026-03-13 09:52:16 +08:00
parent d626a6e5c2
commit 6170f47ca6
5 changed files with 47 additions and 686 deletions

View File

@@ -166,9 +166,12 @@ export class SkillView extends CCComp {
// 清理碰撞体事件监听
if (this.collider) {
this.collider.off(Contact2DType.BEGIN_CONTACT);
this.collider.enabled = false;
}
// 取消所有定时器
this.unscheduleAllCallbacks();
this.node.destroy();
if (this.node && this.node.isValid) {
this.node.active = false;
}
}
}
}