import { _decorator, Animation, Component, Node } from 'cc'; import { SkillCom } from './SkillCom'; import { SkillSet } from '../common/config/SkillSet'; import { ecs } from 'db://oops-framework/libs/ecs/ECS'; import { Skill } from './Skill'; const { ccclass, property } = _decorator; @ccclass('seCom') export class seCom extends Component { base:SkillCom = null start() { this.base =this.node.getComponent(SkillCom) let anim = this.node.getComponent(Animation); anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this); } update(deltaTime: number) { } onAnimationFinished(){ let skill = ecs.getEntity(Skill); this.base.to_console("=>技能二段触发=>"+SkillSet[this.base.s_uuid].sonsk) skill.load(this.node.position,this.base.box_group,this.base.node,SkillSet[this.base.s_uuid].sonsk,this.base.ap,this.base.t_pos,this.base.is_crit,this.base.crit_add); this.base.is_destroy=true } }