public static void Init()
        {
#if UNITY_EDITOR
            Debugger.Log("UNITY_EDITOR", true);
#endif
#if UNITY_ANDROID
            Debugger.Log("UNITY_ANDROID", true);
#endif
#if UNITY_IPHONE
            Debugger.Log("UNITY_IPHONE", true);
#endif
#if UNITY_STANDALONE_WIN
            Debugger.Log("UNITY_STANDALONE_WIN", true);
#endif
            SystemLanguage sl = Application.systemLanguage;
            switch (sl)
            {
            case SystemLanguage.Chinese:
            case SystemLanguage.ChineseSimplified:
                language = "Ch";
                break;

            case SystemLanguage.ChineseTraditional:
                language = "Cht";
                break;

            default:
                language = "En";
                break;
            }
            Debugger.Log("Language : " + language, true);

            SDKManager.Instance.Init();
            //Debugger.Log("ChannelName : " + SDKManager.Instance.ChannelName, true);
            PBChannel pbChannle = new PBChannel(GameClient.Instance.TcpClient);
            GameClient.Instance.TcpClient.SetPBChannel(pbChannle);
            GameNetHandler.Instance.Init();
            UIManager.Instance.Init();
            TimerManager.Instance.AddFarmeTimer(1, () =>
            {
                UIManager.OpenWindow <LaunchWindow>();
            });
        }
Exemplo n.º 2
0
        public static void Init()
        {
            PBChannel pbChannle = new PBChannel(GameClient.Instance.TcpClient);

            GameClient.Instance.TcpClient.SetPBChannel(pbChannle);
            GameNetHandler.Instance.Init();
            UIManager.Instance.Init();
            UIManager.OpenWindow("LaunchWindow");

            /*TestJson tj = new TestJson();
             * tj.id = 1234;
             * tj.name = "hahaha";
             *
             * string str = JsonMapper.ToJson(tj);
             * Debugger.Log(str);
             *
             * TestJson outTj = JsonMapper.ToObject<TestJson>(str);
             * Debugger.Log(outTj.id);
             * Debugger.Log(outTj.name);*/
        }