import { _decorator, Animation, Component, Node } from 'cc';
import { gameManager } from '../gameManager';
const { ccclass, property } = _decorator;

@ccclass('fail_ani')
export class fail_ani extends Component {
    public Play(){
        this.node.active =true;
        this.node.getComponent(Animation).play()
        this.scheduleOnce(()=>{
            this.hideAndStop()
        },1.5)
        gameManager.Singleton.sys_fail_attack_music()
    }

    public hideAndStop(){
        this.node.getComponent(Animation).stop()
        this.node.active =false;
    }
}


