import { _decorator, Component, director, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('GameMenu')
export class GameMenu extends Component {
    start() {

    }

    update(deltaTime: number) {
        
    }

    show(){
        this.node.active = true;
        //暂停游戏
        director.pause();
    }

    //退出游戏=>"选择关卡"
    quit(){
        director.loadScene("SelectScene");
        this.resume();
    }

    //“继续游戏” 以及 关闭UI
    resume(){
        director.resume();
        this.node.active = false;
    }

    //重新开始
    reStart(){
        //director.reset();
    }
}


