refactor(skill): 重构伤害计算逻辑

- 删除SkillEnt.ts及其meta文件,简化技能实体管理
- 将SDataCom重命名为更清晰的DmgDataCom和SDataCom
- 重构伤害计算系统,增加命中检测和伤害类型处理
- 优化技能碰撞检测逻辑,支持范围伤害和数量限制
This commit is contained in:
2025-10-31 13:38:32 +08:00
parent 8c597ae008
commit 65b1eebd84
12 changed files with 136 additions and 147 deletions

View File

@@ -83,7 +83,7 @@ export class Skill extends ecs.Entity {
const sDataCom = this.get(SDataCom);
sDataCom.group=caster.box_group
sDataCom.caster=caster
sDataCom.attrs=casterAttrs
sDataCom.Attrs=casterAttrs
sDataCom.s_uuid=s_uuid
}
@@ -92,6 +92,7 @@ export class Skill extends ecs.Entity {
destroy() {
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
this.remove(SDataCom);
this.remove(SMoveDataComp)
this.remove(SkillView)
super.destroy();