//開始分散式下載 public void StartOrAbortFileDownloading () { isDownloadingAbort = !isDownloadingAbort; //中止下載 if (isDownloadingAbort) { String ButtonName = "Resume Downloading"; share_point_downloadButton_text.text = ButtonName; //set reference fileDownloading = gameObject.GetComponent<FileDownloading>(); fileDownloading.SetIsDownloadingAbortReverse(); print ("isDownloadingAbort = "+isDownloadingAbort); print ("檔案下載中斷"); } else { //set reference fileDownloading = gameObject.GetComponent<FileDownloading>(); String ButtonName = "Abort"; share_point_downloadButton_text.text = ButtonName; //設定下載路徑 String DownLoadURL = SetDownLoadURL (textField_url.text); if (DownLoadURL.Length <= 0) { #if MYTEST //預設網址 url="http://www.jap-idols.com/wp-content/uploads/2012/07/nozomi_sasaki_new_bikini_gi_11.jpg"; DownLoadURL = SetDownLoadURL (url); #else //空白 print("請輸入url "); return; #endif } url = DownLoadURL; //開始分散下載 StartCoroutine(startShareDownloading()); } }
private void OnFileDownloading(object sender, FileDownloadingArgs e) { FileDownloading?.Invoke(this, e); }