
const {ccclass, property, requireComponent} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(false)
    localTest: boolean = false;

    @property("")
    clientTestVersion: string = "1.0.0";

    @property(cc.Label)
    testVersion: cc.Label = null;

    start () {
        window.initMgr();
        cc.fx.GameConfig.init(this.localTest);
        cc.fx.AudioManager.Instance.init();
        this.testVersion.string = this.clientTestVersion;

        // setTimeout(() => {
        //     for(let i=0; i<10;i++){
        //         let num = cc.fx.GameTool.getSeedRandom(1,10);
        //         console.log(num);
        //     }
        // }, 100);

    }

    //开始游戏，跳转至引导页面
    startGame(){
        setTimeout(() => {
            cc.director.loadScene("GameScene");
        }, 100);

        // cc.director.loadScene("GuideScene");
    }
    //备用，用来测试跳转 指定关卡
    clickBtn(event,data){
        cc.fx.GameConfig.GM_INFO.custom = parseInt(data);
        cc.director.loadScene("GameScene");
    }   
    //打开排行榜
    openRank(){
        setTimeout(() => {
            cc.director.loadScene("RankScene");
        }, 100);
    }
    
    protected update(dt: number): void {
    }
}
