示例#1
0
        private IEnumerator retry_coroutine()
        {
            message_box_ui_.Close();
            www_ = new WWW(url_);
            yield return(www_);

            if (string.IsNullOrEmpty(www_.error) == false)
            {
                Debug.Log(www_.error);
                www_.Dispose();
                // 暂时屏蔽

                /*Button.ButtonClickedEvent click_event = new Button.ButtonClickedEvent();
                 * click_event.AddListener(retry);
                 * message_box_ui_.Show("网络出现问题,点击可以重试", "重试连接", click_event);*/
            }
            else
            {
                finished_ = true;
            }
        }
    public void OnClickSetVersion()
    {
        if (messageBox.gameObject.activeInHierarchy)
        {
            return;
        }

        if (updateVersion <= 0)
        {
            string error = Bootstrap.use_data_dir("", "");
            if (!string.IsNullOrEmpty(error))
            {
                messageBox.Show("use failed. empty path error:" + error, "ok", () => { messageBox.Close(); });
            }
            else
            {
                StartCoroutine(Restart());
            }
            return;
        }
        StartCoroutine(PreparePatchAndRestart());
    }