Update Operation System

pull/51/head
hevinci 2022-10-11 18:27:04 +08:00
parent 608f401a80
commit 1de9e0b79d
3 changed files with 8 additions and 12 deletions

View File

@ -81,7 +81,11 @@ namespace YooAsset
Status = EOperationStatus.Succeed;
}
}
public override void Cancel()
/// <summary>
/// 取消实例化对象操作
/// </summary>
public void Cancel()
{
if (IsDone == false)
{

View File

@ -81,14 +81,6 @@ namespace YooAsset
_taskCompletionSource.TrySetResult(null);
}
/// <summary>
/// 取消异步操作
/// </summary>
public virtual void Cancel()
{
throw new NotImplementedException("Can not cancel operation !");
}
#region 异步编程相关
bool IEnumerator.MoveNext()
{

View File

@ -1,7 +1,7 @@

namespace YooAsset
{
public class GameAsyncOperation : AsyncOperationBase
public abstract class GameAsyncOperation : AsyncOperationBase
{
internal override void Start()
{
@ -12,7 +12,7 @@ namespace YooAsset
OnUpdate();
}
protected virtual void OnStart() { }
protected virtual void OnUpdate() { }
protected abstract void OnStart();
protected abstract void OnUpdate();
}
}