重构伤害处理逻辑,将直接伤害组件改为队列系统 - 新增DamageQueueComp组件管理伤害事件队列 - 添加DamageQueueHelper工具类处理伤害事件添加和查询 - 修改HeroAtkSystem改为处理伤害队列而非单个伤害 - 移除旧的DmgDataCom组件及相关引用 - 优化SkillView.apply_damage使用新队列系统
26 lines
722 B
TypeScript
26 lines
722 B
TypeScript
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
import { BoxSet } from "../common/config/BoxSet";
|
|
import { HeroViewComp } from "../hero/HeroViewComp";
|
|
|
|
/** 业务层对象 */
|
|
//技能数据
|
|
@ecs.register('SDataCom')
|
|
export class SDataCom extends ecs.Comp {
|
|
/** 业务层组件移除时,重置所有数据为默认值 */
|
|
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
|
|
}
|
|
}
|
|
|