Example #1
0
    /// <summary>
    /// Raises the destroy event.
    /// </summary>
    void OnDestroy()
    {
        XTcpServer.GetSingleton().Shutdown();

        if (luaServer != null)
        {
            LuaSvr.mainState.run("exit");
        }
    }
Example #2
0
    /// <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);
        });
    }
Example #3
0
 /// <summary>
 /// Fixeds the update.
 /// </summary>
 void FixedUpdate()
 {
     XTcpServer.GetSingleton().Update();
 }