diff --git a/assets/script/game/hero/HeroAttrEvent.ts b/assets/script/game/hero/HeroAttrEvent.ts index b1b4ef31..de255d51 100644 --- a/assets/script/game/hero/HeroAttrEvent.ts +++ b/assets/script/game/hero/HeroAttrEvent.ts @@ -1,29 +1,20 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { Attrs } from "../common/config/HeroAttrs"; -/** - * ==================== 伤害事件数据 ==================== - * - * 单个伤害事件的数据结构 - */ export interface AttrEvent { - /** 伤害属性数据 */ Attr: Attrs; Value:number; } -/** - * ==================== 伤害队列组件 ==================== - * - * 用途: - - */ @ecs.register('HeroAttrEvent') export class HeroAttrEvent extends ecs.Comp { - /** 伤害事件队列 */ - AttrEvent: AttrEvent[] = []; - reset() { - this.AttrEvent = []; + + + AttrEvents:AttrEvent[] = []; + addAttrEvent(event:AttrEvent){ + this.AttrEvents.push(event); + } + reset() { + this.AttrEvents = []; } - } \ No newline at end of file