Files
heros/assets/script/game/skills/timedCom.ts
2025-01-05 15:59:40 +08:00

25 lines
461 B
TypeScript

import { _decorator, Component, Node } from 'cc';
import { SkillSet } from '../common/config/SkillSet';
const { ccclass, property } = _decorator;
@ccclass('timedCom')
export class timedCom extends Component {
time = 0.3;
cd: number = 0;
ap: number = 0;
start() {
}
update(deltaTime: number) {
this.time = this.time - deltaTime;
if(this.time <= 0)
{
this.node.destroy()
}
}
}