From a2e57c6e9045f34a0c058d1b2f1e6edaf49a1609 Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 25 Aug 2023 17:37:49 +0800 Subject: [PATCH] update operation system --- Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs | 4 ++-- Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs b/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs index 6f46416..029c7aa 100644 --- a/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs +++ b/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs @@ -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; } diff --git a/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs b/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs index 0c12a54..ff416d9 100644 --- a/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs +++ b/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs @@ -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(); } }