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(); }
void IFsmNode.OnEnter() { PatchEventDispatcher.SendPatchStepsChangeMsg(EPatchStates.DownloadOver); _patcher.SaveRemotePatchManifest(); _patcher.SwitchNext(); }