旋风斩 螺旋丸 完成
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
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')
|
||||
@@ -9,12 +11,18 @@ export class seCom extends Component {
|
||||
|
||||
start() {
|
||||
this.base =this.node.getComponent(SkillCom)
|
||||
let anim = this.node.getComponent(Animation);
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
if (this.base.is_destroy) {
|
||||
console.log("执行第二技能",SkillSet[this.base.s_uuid].sonsk)
|
||||
}
|
||||
|
||||
}
|
||||
onAnimationFinished(){
|
||||
let skill = ecs.getEntity<Skill>(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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user