Exemple #1
0
 /// <summary>
 /// 计算下载的资源
 /// </summary>
 void ComputeDownload()
 {
     downLoadList.Clear();
     downLoadDic.Clear();
     downLoadMD5Dic.Clear();
     if (gameVersion != null && gameVersion.Pathces != null && gameVersion.Pathces.Length > 0)
     {
         currentPatches = gameVersion.Pathces[gameVersion.Pathces.Length - 1];
         if (currentPatches.Files != null && currentPatches.Files.Count > 0)
         {
             foreach (Patch patch in currentPatches.Files)
             {
                 if ((Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsEditor) && (patch.Platform.Contains("StandaloneWindows64") || patch.Platform.Contains("StandaloneWindows")))
                 {
                     AddDownLoadList(patch);
                 }
                 else if ((Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.WindowsEditor) && patch.Platform.Contains("Android"))
                 {
                     AddDownLoadList(patch);
                 }
                 else if ((Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.WindowsEditor) && patch.Platform.Contains("IOS"))
                 {
                     AddDownLoadList(patch);
                 }
             }
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// 获取所有热更包信息
 /// </summary>
 void GetHotAB()
 {
     if (gameVersion != null && gameVersion.Pathces != null && gameVersion.Pathces.Length > 0)
     {
         Pathces lastPatches = gameVersion.Pathces[gameVersion.Pathces.Length - 1];
         if (lastPatches != null && lastPatches.Files != null)
         {
             foreach (Patch patch in lastPatches.Files)
             {
                 hotFixDic.Add(patch.Name, patch);
             }
         }
     }
 }