Пример #1
0
        public void ReqAllPkgs(Action <bool> callback)
        {
            mReqAllCall = callback;
            List <string> urls = new List <string>();

            foreach (var item in UpdateMgr.Instance.ResServList)
            {
                urls.Add(Tools.PathCombine(item.path, GameConfig.STR_ASB_MANIFIST + "/version/" + ConfFile));
            }
            WWWTO www = WWWTO.ReadFirstExistsStr(urls, _onAllPkgResp, null);

            www.Start();
        }
Пример #2
0
 /// <summary>
 /// 获取服务器上相应平台的配置信息
 /// </summary>
 /// <param name="callback">回调.</param>
 /// <param name="forceLoad">如果设置为 <c>true</c> 强制从服务器获取</param>
 public void LoadServConf(Action <Dictionary <string, string> > callback, bool forceLoad = false)
 {
     mServConfCall = callback;
     if (null == mServConf || mServConf.Count == 0 || forceLoad)
     {
         LoadResServList((ResInfo[] list) =>
         {
             List <string> files = new List <string>();
             for (int i = 0; i < list.Length; i++)
             {
                 files.Add(Tools.PathCombine(list[i].path, GameConfig.STR_ASB_MANIFIST + "/servConf.bytes"));
             }
             WWWTO www      = WWWTO.ReadFirstExistsStr(files, _onServConfResp, null);
             www.TimeoutSec = 1.5f;
             www.Start();
         });
     }
     else
     {
         _callbackServConf();
     }
 }