public void SetBundleDownloader(BundleDownloader bundleDownloader) { mBundleDownloader = bundleDownloader; mBundleDownloader.pFinishAndDisposeCall += pFinishAndDisposeCall; mBundleDownloader.pFinishAndDisposeCall += FinishAciton; mBundleDownloader.pLoserCall += pLoserCall; }
//开始下载 public async ETTask StartAsync(string fileFoldr = "", string versionName = "Version.txt", BundleDownSchedule downloader = null) { BundleDownloader bundleDownloader = ComponentFactory.Create <BundleDownloader>(); downloader?.SetBundleDownloader(bundleDownloader); await bundleDownloader.StartAsync(fileFoldr, versionName); DisposeBundleDownloader(bundleDownloader); }
//销毁bundle下载工具对象 public void DisposeBundleDownloader(BundleDownloader bundleDownloader) { bundleDownloader.Dispose(); }