mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-20 15:20:07 +00:00
update runtime code
重构了OperationSystem的机制。从列表模式修改为链模式
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user