Наследование: UnityEngine.MonoBehaviour
Пример #1
0
        public FunapiHttpDownloader()
        {
            manager_ = FunapiManager.instance;

            // List file handler
            web_client_.DownloadDataCompleted += new DownloadDataCompletedEventHandler(DownloadDataCompleteCb);

            // Download file handler
            web_client_.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressChangedCb);
            web_client_.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadFileCompleteCb);
        }
        public FunapiHttpDownloader(string target_path, bool enable_verify = false)
        {
            manager_ = FunapiManager.instance;
            enable_verify_ = enable_verify;

            target_path_ = target_path;
            if (target_path_[target_path_.Length - 1] != '/')
                target_path_ += "/";
            target_path_ += kRootPath + "/";
            Debug.Log("Download path : " + target_path_);

            // List file handler
            web_client_.DownloadDataCompleted += new DownloadDataCompletedEventHandler(DownloadDataCompleteCb);

            // Download file handler
            web_client_.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressChangedCb);
            web_client_.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadFileCompleteCb);
        }