mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-14 19:40:47 +00:00
Update Operation System
This commit is contained in:
@@ -81,7 +81,11 @@ namespace YooAsset
|
||||
Status = EOperationStatus.Succeed;
|
||||
}
|
||||
}
|
||||
public override void Cancel()
|
||||
|
||||
/// <summary>
|
||||
/// 取消实例化对象操作
|
||||
/// </summary>
|
||||
public void Cancel()
|
||||
{
|
||||
if (IsDone == false)
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user