Ejemplo n.º 1
0
    void Start()
    {
        try{
            IPAddress[] IPs = Dns.GetHostAddresses(APIS.socketUrl);
            APIS.socketUrl = IPs [0].ToString();

            IPAddress[] IPs2 = Dns.GetHostAddresses(APIS.chatSocketUrl);
            APIS.chatSocketUrl = IPs2 [0].ToString();
        }catch (Exception ex) {
            MyDebug.Log(ex.Message);
        }
        MicroPhoneInput.getInstance();
        GlobalDataScript.getInstance();
        //CustomSocket.getInstance().Connect();
        //ChatSocket.getInstance ();
        TipsManagerScript.getInstance().parent = gameObject.transform;
        SoundCtrl.getInstance();

        //检查更新
        UpdateScript update = new UpdateScript();

        StartCoroutine(update.updateCheck());

        //ServiceErrorListener seriveError = new ServiceErrorListener();
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        heartbeatThread();

        //StartCoroutine(LoadGD());

        //预加载场景
        StartCoroutine(LoadRes());
    }
    void Start()
    {
        MicroPhoneInput.getInstance();
        GlobalDataScript.getInstance();
        //CustomSocket.getInstance().Connect();
        //ChatSocket.getInstance ();
        TipsManagerScript.getInstance().parent = gameObject.transform;
        SoundCtrl.getInstance();

        //检查更新
        UpdateScript update = new UpdateScript();

        StartCoroutine(update.updateCheck());

        //ServiceErrorListener seriveError = new ServiceErrorListener();
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        heartbeatThread();
    }