public void GetMeta(string url, string name, XDownloader.HandleBytesDownload callback, float percent) { this._download = true; this._current_name = name; this._total_percent = percent; base.StartCoroutine(this.MetaDownload(url, callback)); }
private IEnumerator BytesDownload(string url, XDownloader.HandleBytesDownload callback) { WWW wWW = new WWW(url); yield return(wWW); if (callback != null) { callback(wWW, wWW.error); } wWW.Dispose(); wWW = null; yield break; }
private IEnumerator MetaDownload(string url, XDownloader.HandleBytesDownload callback) { XSingleton <XTimerMgr> .singleton.KillTimer(this._token); this._token = XSingleton <XTimerMgr> .singleton.SetTimer(0.1f, this._progressCb, null); this._downloader = new WWW(url); yield return(this._downloader); XSingleton <XTimerMgr> .singleton.KillTimer(this._token); this.Progress(null); XSingleton <XTimerMgr> .singleton.KillTimer(this._token); if (callback != null) { callback(this._downloader, this._downloader.error); } this._downloader.Dispose(); this._downloader = null; yield break; }
public void GetBytes(string url, XDownloader.HandleBytesDownload callback) { base.StartCoroutine(this.BytesDownload(url, callback)); }