Files
pixelheros/assets/script/game/skill/SkillComponent.ts
2025-01-31 21:50:59 +08:00

20 lines
581 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 技能效果组件
@ecs.register('SkillEffect')
export class SkillEffectComp extends ecs.Comp {
damage: number = 0; // 基础伤害
effectType: 'instant' | 'dot' = 'instant'; // 效果类型
duration: number = 0; // 持续时间DOT用
reset() {
this.damage = 0;
this.effectType = 'instant';
this.duration = 0;
}
}
// 碰撞结果组件
@ecs.register('CollisionResult')
export class CollisionResultComp extends ecs.Comp {
targets: ecs.Entity[] = []; // 碰撞到的英雄实体
reset() { this.targets = []; }
}