update operation system

mlyDevMerge1.5.7
hevinci 2023-08-25 17:37:49 +08:00 committed by QiJing
parent 7264a75ca5
commit 3d2f08fb50
2 changed files with 4 additions and 4 deletions

View File

@ -74,14 +74,14 @@ namespace YooAsset
internal abstract void Start();
internal abstract void Update();
internal void OnFinish()
internal void SetFinish()
{
Progress = 1f;
_callback?.Invoke(this);
if (_taskCompletionSource != null)
_taskCompletionSource.TrySetResult(null);
}
internal void OnStart()
internal void SetStart()
{
Status = EOperationStatus.Processing;
}

View File

@ -67,7 +67,7 @@ namespace YooAsset
if (operation.IsDone)
{
_removeList.Add(operation);
operation.OnFinish();
operation.SetFinish();
}
}
@ -101,7 +101,7 @@ namespace YooAsset
public static void StartOperation(AsyncOperationBase operation)
{
_addList.Add(operation);
operation.OnStart();
operation.SetStart();
operation.Start();
}
}