示例#1
0
        private IEnumerator Download()
        {
            // 从远端下载最新的补丁清单
            int           newResourceVersion = _patcher.RequestedResourceVersion;
            string        url      = _patcher.GetWebDownloadURL(newResourceVersion.ToString(), PatchDefine.PatchManifestFileName);
            WebGetRequest download = new WebGetRequest(url);

            download.DownLoad();
            yield return(download);

            // Check fatal
            if (download.HasError())
            {
                download.ReportError();
                download.Dispose();
                PatchEventDispatcher.SendWebPatchManifestDownloadFailedMsg();
                yield break;
            }

            // 保存补丁清单到本地
            _patcher.SaveRemotePatchManifest(download.GetText());
            download.Dispose();
            _patcher.SwitchNext();
        }
示例#2
0
 void IFsmNode.OnEnter()
 {
     PatchEventDispatcher.SendPatchStepsChangeMsg(EPatchStates.DownloadOver);
     _patcher.SaveRemotePatchManifest();
     _patcher.SwitchNext();
 }