Exemple #1
0
        private void DownloadResources()
        {
            SGameUpdaterCallback table = new SGameUpdaterCallback()
            {
                Error         = ResourcesDownloadError,
                Befor         = ResourcesDownloadBefor,
                Progress      = ResourcesDownloadProgress,
                OneComplete   = ResourcesDownloadOneComplete,
                AllComplete   = ResourcesDownloadAllComplete,
                NotNeedUpdate = ResourcesDownloadNotNeedUpdate,
            };
            GameUpdater gameUpdater = new GameUpdater(table);

            gameUpdater.StartDownload(); //开始下载最新资源
        }
Exemple #2
0
        private SGameUpdaterCallback m_downloadCallback;                           //下载资源回调函数Table
        #endregion

        #region 构造方法
        public GameUpdater(SGameUpdaterCallback scallback)
        {
            m_downloadFailConfigList = new List <SGameUpdaterDownloadConfig>();
            m_downloader             = new GameObject("GameUpdater").AddComponent <UnityWeb>();
            m_downloadCallback       = scallback;
        }