コード例 #1
0
ファイル: AssetDownloadManager.cs プロジェクト: cnscj/THSTG
 //后台下载,用于边玩边下(空闲自动下载,随时启动,优先级比前台低
 public AssetDownloadCentral GetBackgroundCentral()
 {
     if (m_backgroundCentral == null)
     {
         GameObject centralGobj = new GameObject("BackgroundCentral");
         centralGobj.transform.SetParent(GetCentralGameObject().transform, false);
         m_backgroundCentral = centralGobj.AddComponent <AssetDownloadCentral>();
     }
     return(m_backgroundCentral);
 }
コード例 #2
0
ファイル: AssetDownloadTask.cs プロジェクト: cnscj/THSTG
        public void StopByManager(AssetDownloadCentral central)
        {
            if (m_downloadMgr == null)
            {
                return;
            }

            m_downloadMgr.StopDown(true, false);
            StartTime = -1;
            status    = AssetDownloadStatus.DOWNLOAD_CANCELED;
        }
コード例 #3
0
ファイル: AssetDownloadTask.cs プロジェクト: cnscj/THSTG
        public void ResumeByManager(AssetDownloadCentral central)
        {
            if (m_downloadMgr == null)
            {
                return;
            }

            m_downloadMgr.ResumeDown();
            StartTime = XTimeTools.NowTimeStampMs;
            status    = AssetDownloadStatus.DOWNLOAD_DOWNLOADING;
        }
コード例 #4
0
ファイル: AssetDownloadTask.cs プロジェクト: cnscj/THSTG
        public void PauseByManager(AssetDownloadCentral central)
        {
            if (m_downloadMgr == null)
            {
                return;
            }

            m_downloadMgr.PauseDown();
            StartTime = -1;
            status    = AssetDownloadStatus.DOWNLOAD_PAUSE;
        }
コード例 #5
0
ファイル: AssetDownloadTask.cs プロジェクト: cnscj/THSTG
        ////////
        public void StartByManager(AssetDownloadCentral central)
        {
            var mgr = GetDownloadMgr();

            mgr.OnDownloadFinish   = OnFinish;
            mgr.OnDownloadProgress = OnProgress;

            mgr.StartDown(urlPaths, savePaths, downThreadNumb, limitDownSize);

            StartTime = XTimeTools.NowTimeStampMs;
            status    = AssetDownloadStatus.DOWNLOAD_DOWNLOADING;
        }
コード例 #6
0
ファイル: AssetDownloadTask.cs プロジェクト: cnscj/THSTG
 public AssetDownloadTask(AssetDownloadCentral central)
 {
     m_central  = central;
     CreateTime = XTimeTools.NowTimeStampMs;
     status     = AssetDownloadStatus.DOWNLOAD_NONE;
 }