コード例 #1
0
ファイル: GamedoniaFiles.cs プロジェクト: Derojo/Medical
        public void Awake()
        {
            /*
            string path = Application.dataPath.Substring (0, Application.dataPath.Length - 5);
            path = path.Substring(0, path.LastIndexOf('/'));
            downloadFolder = path + "/Documents/downloads";
            */
            //Debug.Log ("[GamedoniaFiles] Awake executed");
            downloadFolder = Application.persistentDataPath + "/downloads";
            downloads = new ArrayList ();
            downloadeds = new ArrayList ();

            downloadManager = new DownloadManager(downloadFolder);
            downloadManager.maxConcurrentDownloads = 4;

            _instance = this;

            downloadManager.DownloadDidFinishLoading += (object sender, DownloadManagerEvent e) => { if (DownloadDidFinishLoading != null) this.DownloadDidFinishLoading (sender, e); };
            downloadManager.DownloadDidFail += (object sender, DownloadManagerEvent e) => { if (DownloadDidFail != null) this.DownloadDidFail (sender, e); };
            downloadManager.DownloadDidReceiveData += (object sender, DownloadManagerEvent e) => { if (DownloadDidReceiveData != null) this.DownloadDidReceiveData (sender, e); };
            downloadManager.DownloadDidStart += (object sender, DownloadManagerEvent e) => { if (DownloadDidStart != null) this.DownloadDidStart (sender, e); };
            downloadManager.DownloadDidFinishLoadingAll += (object sender, DownloadManagerEvent e) => { if (DownloadDidFinishLoadingAll != null) this.DownloadDidFinishLoadingAll (sender, e); };
            downloadManager.DownloadDidStartLoadingAllForManager += (object sender, DownloadManagerEvent e) => { if (DownloadDidStartLoadingAllForManager != null) this.DownloadDidStartLoadingAllForManager (sender, e); };
        }
コード例 #2
0
ファイル: DownloadManager.cs プロジェクト: Derojo/Medical
 public DownloadManagerEvent(DownloadManager downloadManager, Download download, int errorCode)
 {
     this.download = download;
     this.downloadManager = downloadManager;
     this.errorCode = errorCode;
 }
コード例 #3
0
ファイル: DownloadManager.cs プロジェクト: nagyistge/Medical
 public DownloadManagerEvent(DownloadManager downloadManager, Download download, int errorCode)
 {
     this.download        = download;
     this.downloadManager = downloadManager;
     this.errorCode       = errorCode;
 }
コード例 #4
0
ファイル: DownloadManager.cs プロジェクト: Derojo/Medical
 public DownloadManagerEvent(DownloadManager downloadManager, Download download)
 {
     this.download = download;
     this.downloadManager = downloadManager;
 }
コード例 #5
0
ファイル: DownloadManager.cs プロジェクト: nagyistge/Medical
 public DownloadManagerEvent(DownloadManager downloadManager, Download download)
 {
     this.download        = download;
     this.downloadManager = downloadManager;
 }