Ejemplo n.º 1
0
        void Awake()
        {
            instance = this;
            DontDestroyOnLoad(this);

            lh = new Framework.Log.LogHandler();

            var config = new ServerConfig();
            var coder  = new Coder();

            TCPInstance    = new TCP(config, coder);
            UpdateActions += TCPInstance.DoActions;
            TCPInstance.Connect();

            UIInstance = new UIManager();
            var userDataInst = UserData.Instance;
            var roomInst     = Lobby.Instance;
            var battleInst   = BattleData.Instance;
            var dialogInst   = Dialog.Instance;

            Screen.sleepTimeout = SleepTimeout.NeverSleep;

            SceneManager.sceneLoaded   += SceneManager_sceneLoaded;
            SceneManager.sceneUnloaded += SceneManager_sceneUnloaded;

            AssetBundleManager.Instance.LoadManifestAsyn(m => { /*SceneManager.LoadScene(1);*/ }, () => {  });
            UIInstance.PushWindowFromResource(WindowType.Loading, WinMsg.None);
        }
Ejemplo n.º 2
0
        void Awake()
        {
            instance = this;
            DontDestroyOnLoad(this);

            lh = new Framework.Log.LogHandler();

            var config = new ServerConfig();
            var coder  = new Coder();

            TCPInstance    = new TCP(config, coder);
            UpdateActions += TCPInstance.DoActions;
            TCPInstance.Connect();

            UIInstance = new UIManager();
            var userDataInst = UserData.Instance;
            var roomInst     = Lobby.Instance;
            var battleInst   = BattleData.Instance;
            var dialogInst   = Dialog.Instance;

            SceneManager.LoadScene(1);
        }