update operation system
parent
7264a75ca5
commit
3d2f08fb50
|
@ -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