mirror of https://github.com/tuyoogame/YooAsset
update operation system
parent
6d37bca2a9
commit
a2e57c6e90
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue