update runtime code

重构了OperationSystem的机制。从列表模式修改为链模式
This commit is contained in:
何冠峰
2025-02-25 12:18:16 +08:00
parent 400c2ccefe
commit c758aa81ff
72 changed files with 385 additions and 260 deletions

View File

@@ -67,11 +67,16 @@ namespace YooAsset
if (_steps == ESteps.LoadFile)
{
if (_loadBundleOp == null)
{
_loadBundleOp = LoadBundleInfo.LoadBundleFile();
_loadBundleOp.StartOperation();
AddChildOperation(_loadBundleOp);
}
if (IsWaitForAsyncComplete)
_loadBundleOp.WaitForAsyncComplete();
_loadBundleOp.UpdateOperation();
DownloadProgress = _loadBundleOp.DownloadProgress;
DownloadedBytes = _loadBundleOp.DownloadedBytes;
if (_loadBundleOp.IsDone == false)
@@ -209,14 +214,5 @@ namespace YooAsset
_removeList.Clear();
}
}
/// <summary>
/// 终止下载任务
/// </summary>
public void AbortDownloadOperation()
{
if (_loadBundleOp != null)
_loadBundleOp.AbortDownloadOperation();
}
}
}