Ejemplo n.º 1
0
        private static IEnumerator DowndLoadFile(string downLoadUrl, string storageLocaPath, Action <float> progress)
        {
            WWW downloadOperation = new WWW(downLoadUrl);

            CoroutineMgr.StartCoroutinee(DowndLoadFileProg(downloadOperation, progress));
            yield return(downloadOperation);

            if (downloadOperation.isDone && string.IsNullOrEmpty(downloadOperation.error))
            {
                //生成文件
                Byte[] b = downloadOperation.bytes;
                Log.Debug("下载完成:" + storageLocaPath);
                File.WriteAllBytes(storageLocaPath, b);
                progress.Invoke(1);
            }
            else
            {
                progress.Invoke(-1);
            }
        }
Ejemplo n.º 2
0
 public static void DowndLoadProgress(string downLoadUrl, string storageLocaPath, Action <float> progress)
 {
     CoroutineMgr.StartCoroutinee(DowndLoadFile(downLoadUrl, storageLocaPath, progress));
 }
Ejemplo n.º 3
0
 //微信分享截屏
 public void WeChatShareScreen()
 {
     CoroutineMgr.StartCoroutinee(CaptureScreen(ScreenFinsh));
 }