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

@@ -3,16 +3,34 @@ import { BoxSet } from "../common/config/BoxSet";
import { HeroViewComp } from "../hero/HeroViewComp";
/** 业务层对象 */
//技能数据
@ecs.register('SDataCom')
export class SDataCom extends ecs.Comp {
/** 业务层组件移除时,重置所有数据为默认值 */
attrs:any=null
Attrs:any=null
caster:HeroViewComp=null
group:BoxSet=BoxSet.HERO
fac: number = 0; // 0:hero 1:monster
s_uuid:number=0
hit_count:number=0 //击中数量
reset() {
this.Attrs=null
this.group=BoxSet.HERO
this.fac=0
this.s_uuid=0
this.caster=null
this.hit_count=0
}
}
//伤害数据
@ecs.register('DmgDataCom')
export class DmgDataCom extends ecs.Comp {
/** 业务层组件移除时,重置所有数据为默认值 */
Attrs:any=null
caster:HeroViewComp=null
s_uuid:number=0
reset() {
this.attrs=null
this.group=0
this.Attrs=null
this.s_uuid=0
this.caster=null
}