瀏覽代碼

Merge branch 'main' of ssh://192.168.0.8:29418/XianJing into hy_en

ybx_Gdn 10 月之前
父節點
當前提交
0cdf415078
共有 1 個文件被更改,包括 25 次插入18 次删除
  1. 25 18
      Assets/Src/Core/DownLoad/DownloadMgr.cs

+ 25 - 18
Assets/Src/Core/DownLoad/DownloadMgr.cs

@@ -407,7 +407,7 @@ public class DownloadMgr : Singleton<DownloadMgr>
         {
             downloadingList.Remove(task.CurDownloadEntity);
         }
-        downloadingSize = 0;
+     
         downloadSize += task.downloadSize;
 
         
@@ -553,28 +553,35 @@ public class DownloadMgr : Singleton<DownloadMgr>
             }
 
 
-            if (localMaxCode >= RVersionCode && SVersionCode == localMaxCode)
+            if (localMaxCode >= RVersionCode)
             {
-                Debug.Log($"lVersionstr =  {lVersionstr}  SVersionstr = {SVersionstr}  =====  version = {version} 不需要跟新 需要删除之前下载资源");
-                versionData = null;
-                ReadDataFromFile(downloadedAssetsFileName, dlocaldatas =>
+                if (SVersionCode == localMaxCode)
                 {
-                    if (dlocaldatas != null)
+                    Debug.Log($"lVersionstr =  {lVersionstr}  SVersionstr = {SVersionstr}  =====  version = {version} 不需要跟新 需要删除之前下载资源");
+                    versionData = null;
+                    ReadDataFromFile(downloadedAssetsFileName, dlocaldatas =>
                     {
-                        List<DownloadDataEntity> localdownloadedList = SerizlizeResList(dlocaldatas);
-                        if (localdownloadedList != null && localdownloadedList.Count > 0)
+                        if (dlocaldatas != null)
                         {
-                            downloadSucessList.AddRange(localdownloadedList);
-                        }
-                        DeleteDownloadFiles();
-
-                    }
-                    else
-                    {
-                        SetCheckFinish();
-                    }
-                },true);
+                            List<DownloadDataEntity> localdownloadedList = SerizlizeResList(dlocaldatas);
+                            if (localdownloadedList != null && localdownloadedList.Count > 0)
+                            {
+                                downloadSucessList.AddRange(localdownloadedList);
+                            }
+                            DeleteDownloadFiles();
 
+                        }
+                        else
+                        {
+                            SetCheckFinish();
+                        }
+                    }, true);
+                }
+                else
+                {
+                    Debug.Log($"lVersionstr =  {lVersionstr}  SVersionstr = {SVersionstr}  =====  version = {version}   不需要更新");
+                    SetCheckFinish();
+                }
             }
             else
             {