debuff 灼烧完成
This commit is contained in:
20
assets/script/game/skills/OnceCom.ts
Normal file
20
assets/script/game/skills/OnceCom.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { _decorator, Animation, Component, Node } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('OnceCom')
|
||||
export class OnceCom extends Component {
|
||||
start() {
|
||||
let anim = this.node.getComponent(Animation);
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
onAnimationFinished(){
|
||||
let bese = this.node.getComponent(SkillCom)
|
||||
bese.is_destroy = true
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user