Example #1
0
 //获得包信息列表
 private void DownloadPackageInfoList(string packageMd5List, Action <List <PackageInfo> > AsynResult, Action OnError, bool isFirstRes = false)
 {
     DownloadMgr.Instance.AsynDownLoadText(packageMd5List, (content) =>
     {
         bool res;
         if (isFirstRes)//是否为首包资源
         {
             res = ServerVersion.ReadFirstResourceList(content);
         }
         else
         {
             res = ServerVersion.ReadResourceList(content);
         }
         if (res)
         {
             if (isFirstRes)
             {
                 AsynResult(ServerVersion.FirstPackageInfoList);
             }
             else
             {
                 AsynResult(ServerVersion.PackageInfoList);
             }
         }
         else
         {
             if (OnError != null)
             {
                 OnError();
             }
         }
     }, OnError);
 }