dd
This commit is contained in:
20
assets/script/game/skills/atked.ts
Normal file
20
assets/script/game/skills/atked.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('atked')
|
||||
export class atked extends Component {
|
||||
time = 0.3;
|
||||
start() {
|
||||
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
this.time = this.time - deltaTime;
|
||||
if(this.time <= 0)
|
||||
{
|
||||
this.node.destroy()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user