清理 skills下的无效文件,有用的迁移到skill目录
This commit is contained in:
18
assets/script/game/skill/oncend.ts
Normal file
18
assets/script/game/skill/oncend.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { _decorator, Component, Node ,Animation} from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('dead')
|
||||
export class dead extends Component {
|
||||
start() {
|
||||
let anim = this.node.getComponent(Animation);
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
onAnimationFinished(){
|
||||
this.node.destroy();
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user