From d90cec51c0285c869a1eca111f6699d1a314762c Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期一, 17 九月 2018 16:55:33 +0800
Subject: [PATCH] 3627 客户端添加是否开启资源下载功能,由后台控制

---
 Core/GameEngine/Login/Launch.cs |   69 +++++++++++++++++-----------------
 1 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/Core/GameEngine/Login/Launch.cs b/Core/GameEngine/Login/Launch.cs
index bea9868..4ba65ea 100644
--- a/Core/GameEngine/Login/Launch.cs
+++ b/Core/GameEngine/Login/Launch.cs
@@ -13,11 +13,9 @@
     static public LaunchStage currentStage { get { return m_CurrentStage; } }
 
     static float m_Progress = 0f;
-    static public float progress
-    {
+    static public float progress {
         get { return m_Progress; }
-        set
-        {
+        set {
             if (m_Progress != value)
             {
                 m_Progress = value;
@@ -185,7 +183,6 @@
         OperationLogCollect.Instance.RecordEvent(2);
 
         m_CurrentStage = LaunchStage.ClientVersion;
-
         if (!Application.isEditor || InGameDownTestUtility.enable)
         {
             VersionUtility.Instance.RequestVersionCheck();
@@ -201,43 +198,45 @@
             }
         }
 
-        m_CurrentStage = LaunchStage.DownLoad;
-        switch (VersionConfig.Get().assetAccess)
+        if (VersionUtility.Instance.versionInfo.downAsset == 1)
         {
-            case InstalledAsset.IngoreDownLoad:
-                break;
-            case InstalledAsset.NullAsset:
-            case InstalledAsset.HalfAsset:
-            case InstalledAsset.FullAsset:
-                AssetVersionUtility.GetAssetVersionFile();
+            m_CurrentStage = LaunchStage.DownLoad;
+            switch (VersionConfig.Get().assetAccess)
+            {
+                case InstalledAsset.IngoreDownLoad:
+                    break;
+                case InstalledAsset.NullAsset:
+                case InstalledAsset.HalfAsset:
+                case InstalledAsset.FullAsset:
+                    AssetVersionUtility.GetAssetVersionFile();
 
-                progressBuf = progress;
-                timer = 0f;
-                duration = 1.5f;
-
-                while (!AssetVersionUtility.checkAssetCompleted)
-                {
-                    timer += Time.deltaTime;
-                    progress = Mathf.Clamp(progressBuf + timer / duration * 0.3f, progressBuf, progressBuf + 0.3f);
-                    yield return null;
-                }
-
-                if (!AssetVersionUtility.priorAssetDownLoadDone)
-                {
-                    AssetVersionUtility.BeginDownLoadTask(true);
-                    while (!AssetVersionUtility.priorAssetDownLoadDone)
+                    progressBuf = progress;
+                    timer = 0f;
+                    duration = 1.5f;
+                    while (!AssetVersionUtility.checkAssetCompleted)
                     {
+                        timer += Time.deltaTime;
+                        progress = Mathf.Clamp(progressBuf + timer / duration * 0.3f, progressBuf, progressBuf + 0.3f);
                         yield return null;
                     }
 
-                    yield return WaitingForSecondConst.WaitMS200;
-                }
+                    if (!AssetVersionUtility.priorAssetDownLoadDone)
+                    {
+                        AssetVersionUtility.BeginDownLoadTask(true);
+                        while (!AssetVersionUtility.priorAssetDownLoadDone)
+                        {
+                            yield return null;
+                        }
 
-                if (!AssetVersionUtility.unPriorAssetDownLoadDone)
-                {
-                    AssetVersionUtility.BeginDownLoadTask(false);
-                }
-                break;
+                        yield return WaitingForSecondConst.WaitMS200;
+                    }
+
+                    if (!AssetVersionUtility.unPriorAssetDownLoadDone)
+                    {
+                        AssetVersionUtility.BeginDownLoadTask(false);
+                    }
+                    break;
+            }
         }
 
         if (!AssetSource.allFromEditor)

--
Gitblit v1.8.0