Update Operation System
parent
608f401a80
commit
1de9e0b79d
|
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue