/// <summary> /// Raises the destroy event. /// </summary> void OnDestroy() { XTcpServer.GetSingleton().Shutdown(); if (luaServer != null) { LuaSvr.mainState.run("exit"); } }
/// <summary> /// Start this instance. /// </summary> IEnumerator Start() { yield return(ResetReporter()); yield return(InitBootstrap()); yield return(StartCoroutine(XUpdater.DoUpdate(delegate(XUpdater.Stage stage, float progress, string message) { }))); XCameraHelper.Initializ(); XTcpServer.GetSingleton().Initliaze(); // init slua InitSLua(delegate(int progress) { GameObject.DontDestroyOnLoad(gameObject); }); }
/// <summary> /// Fixeds the update. /// </summary> void FixedUpdate() { XTcpServer.GetSingleton().Update(); }