// Token: 0x060159EE RID: 88558 RVA: 0x00580C5C File Offset: 0x0057EE5C private IEnumerator GetAudioDownloadLengthAndNotifyUser(long downloadAssetbundleBytes) { yield return(AudioManager4CRI.DownloadAudioFiles(delegate(bool ret) { if (!ret) { global::Debug.LogError("ProjectLGameEntryUITask.GetAudioDownloadLengthAndNotifyUser Get audio download length failed!"); } }, null, delegate(long downloadLengh) { this.m_downloadAudioLength = downloadLengh; downloadAssetbundleBytes += downloadLengh; }, null)); double sizeMB = (double)downloadAssetbundleBytes * 9.5367431640625E-07; if (sizeMB < 5.0 && Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork) { global::Debug.Log(string.Format("Directly download patch({0:F2}MB) less than 5MB in WIFI.", sizeMB)); base.StartPreDownload(); PDSDK.Instance.printGameEventLog("15", string.Empty); yield break; } this.m_mainCtrl.StartCoroutine(DialogBox.Show(this.m_mainCtrl.gameObject, "Assets/GameProject/Resources/UI/DialogBox.prefab", string.Format(StringTable.Get("MsgUpdateClientOrNot"), sizeMB), StringTable.Get("ButtonUpdate"), StringTable.Get("ButtonNo"), delegate(DialogBoxResult ret) { if (ret == DialogBoxResult.Ok) { this.StartPreDownload(); PDSDK.Instance.printGameEventLog("15", string.Empty); } else { Application.Quit(); } })); yield break; }
// Token: 0x060159E8 RID: 88552 RVA: 0x00580B74 File Offset: 0x0057ED74 protected override IEnumerator DownloadAudioFiles() { if (PDSDK.IsIosReview) { yield break; } float updateTime = Time.unscaledTime + 1f; long lastDownloadedLength = 0L; bool isSuccess = true; long downloadAssetbundleLength = ResourceManager.Instance.GetTotalPreUpdateingDownloadBytes(); yield return(AudioManager4CRI.DownloadAudioFiles(delegate(bool ret) { isSuccess = ret; }, delegate(long downloadedLength, long totalLength) { if (Time.unscaledTime > updateTime) { if (this.m_downloadAudioLength <= 0L) { this.m_downloadAudioLength = totalLength; } this.m_mainCtrl.SetProgress(0.5f + (float)downloadedLength / (float)totalLength * 0.2f); this.m_mainCtrl.SetMesssage(string.Format(StringTable.Get("MsgCurrentDownloadInfo"), (double)(downloadAssetbundleLength + downloadedLength) * 9.5367431640625E-07, (double)(downloadAssetbundleLength + this.m_downloadAudioLength) * 9.5367431640625E-07, (double)(downloadedLength - lastDownloadedLength) / 1024.0 / (double)(Time.unscaledTime - updateTime + 1f))); lastDownloadedLength = downloadedLength; updateTime = Time.unscaledTime + 1f; } }, null, this.m_mainCtrl)); if (!isSuccess) { PDSDK.Instance.printGameEventLog("18.1", string.Empty); yield return(DialogBox.Show(this.m_mainCtrl.gameObject, "Assets/GameProject/Resources/UI/DialogBox.prefab", StringTable.Get("MsgUpdateAudioFailed"), StringTable.Get("ButtonOK"), string.Empty, null)); } yield break; }