private void Start() { //启动 ShineSetup.setup(this.gameObject); Ctrl.print("启动"); // SceneManager.sceneLoaded+=onSceneLoaded; // UnityEditor.EditorApplication.LoadLevelInPlayMode("Assets/source/art/Scene/Yw_LiangShan.unity"); // loadFromBundle(); }
//启动 public void start(GameObject root) { ShineSetting.isEditor = false; //路径 countIsRelease(); initSetting(); //引擎启动 ShineSetup.setup(root, onExit); start(); }
private ConfigReadData toRead(BytesReadStream stream) { ConfigReadData data = doRead(stream); if (data == null) { ShineSetup.exit(); return(null); } _readData = data; return(data); }
/** 检查版本 */ public void checkVersion(V me) { SaveVersionData vData = getVersionData(me); Action <V> func; if (vData.cVersion != CommonSetting.cVersion) { if (CommonSetting.cVersion < vData.cVersion) { Ctrl.throwError("版本号不能更低C"); ShineSetup.exit(); return; } for (int i = vData.cVersion + 1; i <= CommonSetting.cVersion; ++i) { if ((func = _cDic.get(i)) != null) { func(me); } vData.cVersion = i; } } if (vData.gVersion != CommonSetting.gVersion) { if (CommonSetting.gVersion < vData.gVersion) { Ctrl.throwError("版本号不能更低G"); ShineSetup.exit(); return; } for (int i = vData.gVersion + 1; i <= CommonSetting.gVersion; ++i) { if ((func = _gDic.get(i)) != null) { func(me); } vData.gVersion = i; } } }
protected override void stepShowLogo() { if (!BaseSetting.needShowLogo) { _stepTool.completeStep(ShowLogo); return; } Transform logo = ShineSetup.getRoot().transform.GetChild(0); logo.gameObject.SetActive(true); Image component = logo.transform.Find("image").GetComponent <Image>(); Color color = component.color; color.a = 0f; component.color = color; TimeDriver.instance.setTimeOut(() => { Tween.normal.create(0f, 1f, 1000, v => { color.a = v; component.color = color; }, () => { TimeDriver.instance.setTimeOut(() => { Tween.normal.create(1f, 0f, 1000, v => { color.a = v; component.color = color; }, () => { //直接销毁 GameObject.Destroy(logo.gameObject); _stepTool.completeStep(ShowLogo); }); }, 1600); }); }, 800); }
public virtual void refreshReporter() { _reporter = ShineSetup.getRoot().GetComponent <Reporter>(); if (CommonSetting.useReporter) { if (_reporter == null) { Ctrl.throwError("不该找不到Reporter"); } } else { //为了恢复 if (_reporter != null) { GameObject.DestroyImmediate(_reporter); _reporter = null; } } }
public void startE() { long now = Ctrl.getTimer(); //路径 countIsRelease(); initSetting(); //基础客户端停掉 if (!ShineSetting.isWholeClient) { return; } ShineSetup.setupForEditor(); startForEditor(); GameC.mainLogin.loadGameSync(); Ctrl.print("editor就绪,耗时:" + (Ctrl.getTimer() - now) + "ms"); }
/** 退出游戏 */ protected virtual void exitGame() { ShineSetup.exit(); }
protected override GameObject getGameObject() { return(ShineSetup.getRoot().transform.GetChild(1).gameObject); }
/** 退出游戏(直接) */ public void exit() { ShineSetup.exit(); }