From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/AssetVersion/InGameDownLoad.cs | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/Main/System/AssetVersion/InGameDownLoad.cs b/Main/System/AssetVersion/InGameDownLoad.cs
index dfcc104..3a5965e 100644
--- a/Main/System/AssetVersion/InGameDownLoad.cs
+++ b/Main/System/AssetVersion/InGameDownLoad.cs
@@ -27,7 +27,7 @@
public bool isDone { get { return state == State.Completed; } } //鏄惁鍏ㄩ儴涓嬭浇瀹屾垚
//绐楀彛涓樉绀虹殑宸蹭笅杞藉ぇ灏�
- public long showDownLoadedSize { get { return DownloadMgr.Instance.DownloadedBytes - backGroundDownLoadSizeRecord; } }
+ public long showDownLoadedSize { get { return DownloadHotMgr.Instance.DownloadedBytes - backGroundDownLoadSizeRecord; } }
public long showTotalSize { get { return totalSize - backGroundDownLoadSizeRecord; } }//绐楀彛涓樉绀虹殑鎬诲ぇ灏�
public int showTotalCount { get { return totalCount - downLoadedCountRecord; } }//绐楀彛涓樉绀虹殑鎬绘暟閲�
public int showOkCount { get { return okCount - downLoadedCountRecord; } }//绐楀彛涓樉绀虹殑涓嬭浇瀹屾垚鏁伴噺
@@ -91,7 +91,7 @@
private void Awake()
{
- DownloadMgr.MaxDownLoadTask = GetMaxTask();
+ DownloadHotMgr.MaxDownLoadTask = GetMaxTask();
}
private void LateUpdate()
@@ -145,7 +145,7 @@
okCount = 0;
totalSize = 0;
- DownloadMgr.Instance.Prepare();
+ DownloadHotMgr.Instance.Prepare();
for (int i = 0; i < this.assets.Count; i++)
{
@@ -164,7 +164,7 @@
//娣诲姞涓嬭浇浠诲姟
var remoteURL = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/", assetVersion.relativePath);
var localURL = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, assetVersion.relativePath);
- DownloadMgr.Instance.AddTask(new DownloadTask(remoteURL, localURL, assetVersion));
+ DownloadHotMgr.Instance.AddTask(new DownloadHotTask(remoteURL, localURL, assetVersion));
}
state = State.None;
@@ -245,7 +245,7 @@
case Dominant.Half:
if (dominantState == Dominant.None)
{
- backGroundDownLoadSizeRecord = DownloadMgr.Instance.DownloadedBytes;
+ backGroundDownLoadSizeRecord = DownloadHotMgr.Instance.DownloadedBytes;
downLoadedCountRecord = okCount;
}
StartDownLoad();
@@ -254,7 +254,7 @@
case Dominant.Whole:
if (dominantState == Dominant.None)
{
- backGroundDownLoadSizeRecord = DownloadMgr.Instance.DownloadedBytes;
+ backGroundDownLoadSizeRecord = DownloadHotMgr.Instance.DownloadedBytes;
downLoadedCountRecord = okCount;
Pause();
state = State.Prepared;
@@ -265,8 +265,7 @@
state = State.Prepared;
}
dominantState = Dominant.Whole;
- UIManager.Instance.OpenWindow<InGameDownLoadWin>();
- // // WindowCenter.Instance.Open<InGameDownLoadWin>();
+ // UIManager.Instance.OpenWindow<InGameDownLoadWin>();
break;
}
}
@@ -277,7 +276,7 @@
if (state == State.None || state == State.Prepared || state == State.Pause)
{
state = State.DownLoad;
- DownloadMgr.Instance.Begin(OnFileDownLoadCompleted);
+ DownloadHotMgr.Instance.Begin(OnFileDownLoadCompleted);
}
}
@@ -286,13 +285,13 @@
{
if (state == State.DownLoad)
{
- DownloadMgr.Instance.Stop();
+ DownloadHotMgr.Instance.Stop();
state = State.Pause;
}
}
//鏂囦欢涓嬭浇瀹屾垚鍥炶皟
- private bool OnFileDownLoadCompleted(bool finished, DownloadTask task)
+ private bool OnFileDownLoadCompleted(bool finished, DownloadHotTask task)
{
if (task.IsDone && task.obj is AssetVersion)
{
--
Gitblit v1.8.0