private void Update() { if (thread != null) { if (thread.Events.Count > 0) { DownloadEvent e = thread.Events.Dequeue(); switch (e.eventType) { case DownloadEventType.Progress: break; case DownloadEventType.Completed: md5File.UpdateLoaclMd5File(e.config.key); completeCount++; if (completeCount == downloadCount) { md5File.WriteToLocalFile(GameConfig.default_module); isWriteMd5File = false; Ready(); } break; case DownloadEventType.Error: Debug.Log("下载失败了"); break; } } } }
public void WriteToLocalFile(string module) { if (_md5File != null) { _md5File.WriteToLocalFile(module); } }