26 lines
514 B
TypeScript
26 lines
514 B
TypeScript
import { _decorator, Component, Node } from 'cc';
|
|
import { SkillSet } from '../common/config/SkillSet';
|
|
import { smc } from '../common/SingletonModuleComp';
|
|
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()
|
|
}
|
|
}
|
|
}
|
|
|
|
|