refactor(skill): 重构伤害计算逻辑
- 删除SkillEnt.ts及其meta文件,简化技能实体管理 - 将SDataCom重命名为更清晰的DmgDataCom和SDataCom - 重构伤害计算系统,增加命中检测和伤害类型处理 - 优化技能碰撞检测逻辑,支持范围伤害和数量限制
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user