const {ccclass, property, requireComponent} = cc._decorator; @ccclass export default class NewClass extends cc.Component { @property(false) localTest: boolean = false; @property("") clientTestVersion: string = "1.0.1"; @property(cc.Label) testVersion: cc.Label = null; start () { cc.macro.ENABLE_MULTI_TOUCH = false; window.initMgr(); cc.fx.GameConfig.init(this.localTest); // cc.fx.AudioManager.Instance.init(); // this.testVersion.string = this.clientTestVersion; } //开始游戏,跳转至引导页面 startGame(){ cc.fx.GameConfig.GM_INFO.isCustom = false; cc.director.loadScene("GameScene"); // cc.director.loadScene("GuideScene"); } //备用,用来测试跳转 指定关卡 clickBtn(event,data){ cc.fx.GameConfig.GM_INFO.level = parseInt(data); cc.fx.GameConfig.GM_INFO.isCustom = true; cc.director.loadScene("GameScene"); } //打开排行榜 openRank(){ cc.director.loadScene("RankScene"); } showCustom(){ if(this.node.getChildByName("Custom").active){ this.node.getChildByName("Custom").active = false; } else{ this.node.getChildByName("Custom").active = true; } } protected update(dt: number): void { } }