1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import Socket from "../base/Socket";
- cc.Class({
- extends: cc.Component,
- properties: {
- loadLayer: cc.Node,
- loginLayer: cc.Node,
- labVersion: cc.Label,
- },
- // LIFE-CYCLE CALLBACKS:
- onLoad () {
- window.netSocket = new Socket();
-
- },
- start () {
- this.labVersion.string = AppSettings.Version;
- AppSettings.init();
- // AppSettings.initClientConfig();
- this.goLoadlayer();
- },
- //检测更新
- goLoadlayer(){
- this.loadLayer.active = true;
- this.loginLayer.active = false;
- this.loadLayer.getComponent('LoadLayer').initData();
- },
- goLoginLayer(){
- this.loadLayer.active = false;
- this.loginLayer.active = true;
- this.loginLayer.getComponent('LoginLayer').initData();
- },
- });
|