public void Init(IDownloadable downloadable, DownloadProgressObserver observer) { this.fileName = downloadable.GetBundleName(); this.serverUrl = downloadable.GetServerUrl(); this.observer = observer; this.loadOnComplete = downloadable.IsLoadOnComplete(); this.downloadVersion = downloadable.GetVersion(); this.priority = downloadable.GetPriority(); }
public void LoadBundle(IDownloadable downloadable) { DownloadProgressObserver downloadProgressObserver = new DownloadProgressObserver(downloadable); //Create download Request DownloadRequest req = new DownloadRequest(); //Instantiate req manager req.Init(downloadable, downloadProgressObserver); //Schedule download downloadRequestManager.EnqueueDownload(req); }