Exemple #1
0
 public void Update()
 {
     if (m_bDownloading)
     {
         lock (AssetDownloader.Instance().m_lockWeb)
         {
             if (AssetDownloader.Instance().m_bFinished)
             {
                 m_bDownloading = false;
                 m_comEnvChecker.LocalVerCheck();
             }
             else
             {
                 m_comEnvChecker.DownloadProcess(AssetDownloader.Instance().m_qwLoaded, AssetDownloader.Instance().m_qwTotal);
             }
         }
     }
 }
Exemple #2
0
    public void StartDownload()
    {
        m_bDownloading = true;
        string szVersion = GameInstance.Instance().proServerUrl
                           + string.Format(GameInstance.Instance().proServerPlatformContentPath,
                                           VersionManager.Instance().GetVersionUrl(), SysUtil.GetPlatformName())
                           + "?" + Time.realtimeSinceStartup.ToString();

        AssetDownloader.Instance().AddURL(szVersion);
        string szVersionContent = GameInstance.Instance().proServerUrl
                                  + string.Format(GameInstance.Instance().proServerVersionContent, VersionManager.Instance().GetVersionUrl())
                                  + "?" + Time.realtimeSinceStartup.ToString();

        AssetDownloader.Instance().AddURL(szVersionContent);
        //AssetDownloader.Intance().AddURL(getCommonURL());
        //AssetDownloader.Intance().AddURL(getCustomURL());
        AssetDownloader.Instance().Start();
    }