protected void TryStartNextTask() { if (mDownloadingTask != null) { return; } if (mWaitDownloadList.Count == 0) { return; } IDownloadTask next = PopNextTask(); if (next == null) { return; } //next.ResState = eResState.kDownloading; mDownloadingTask = next; HttpDownloaderMgr.Instance.AddDownloadTask(next.Url, next.LocalResPath, null, OnDownloadError, OnDownloadFinish, null); next.DeleteOldResFile(); }
protected void TryStartNextTask() { if (m_DownloadingTask != null) { WWWDownloader.S.Clear(); return; } if (m_WaitDownloadList.Count == 0) { WWWDownloader.S.Clear(); return; } IDownloadTask next = PopNextTask(); if (next == null) { WWWDownloader.S.Clear(); return; } //next.ResState = eResState.kDownloading; m_DownloadingTask = next; //HttpDownloaderMgr.S.AddDownloadTask(next.url, next.localResPath, OnDownloadProgress, OnDownloadError, OnDownloadFinish, null); WWWDownloader.S.AddDownloadTask(next.url, next.localResPath, next.fileSize, OnDownloadProgress, OnDownloadError, OnDownloadFinish, null, next.OnValidCheck, next.logError); next.DeleteOldResFile(); }