加血技能完成 怪物动画减少

This commit is contained in:
2024-09-15 23:25:34 +08:00
parent 417b5d85be
commit 2095393757
317 changed files with 36222 additions and 60962 deletions

View File

@@ -0,0 +1,29 @@
import { _decorator, Component, Node, sp ,Animation, AnimationState} from 'cc';
import { Timer } from '../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer';
const { ccclass, property ,} = _decorator;
@ccclass('anonce')
export class anonce extends Component {
timer:Timer=new Timer(0.5);
start() {
}
protected onLoad(): void {
}
update(deltaTime: number) {
if(this.node.active){
if(!this.node.getChildByName("skill").getComponent(Animation).getState("heathed").isPlaying){
this.node.getChildByName("skill").getComponent(Animation).play();
}
if (this.timer.update(deltaTime)) {
this.node.active=false;
}
}
}
}