import SoundMgr from "../FrameWork/Mgr/SoundMgr";
import VibrateMgr from "../FrameWork/Mgr/VibrateMgr";
import Common5 from "../Platform/th/Common5";


const { ccclass, property } = cc._decorator;

@ccclass
export default class AllComplete extends cc.Component {

    protected showNode: cc.Node = null;

    protected btnClose: cc.Node = null;
    // LIFE-CYCLE CALLBACKS:

    onLoad() {
        this.showNode = this.node.getChildByName("show").getChildByName("showNode");
        this.btnClose = this.node.getChildByName("btnClose");
        Common5.btnRegister_custom(this.btnClose, () => {
            this.btnCloseFunc();
        })
    }

    start() {

    }

    btnCloseFunc() {
        // Common5.isBackLevel = 3;
        Common5.isBackLevel = 0;
        cc.director.loadScene("MainScene");
        this.node.removeFromParent();
    }


    // update (dt) {}
}