mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-28 11:38:47 +00:00
Update Operation System
This commit is contained in:
@@ -81,7 +81,11 @@ namespace YooAsset
|
|||||||
Status = EOperationStatus.Succeed;
|
Status = EOperationStatus.Succeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override void Cancel()
|
|
||||||
|
/// <summary>
|
||||||
|
/// 取消实例化对象操作
|
||||||
|
/// </summary>
|
||||||
|
public void Cancel()
|
||||||
{
|
{
|
||||||
if (IsDone == false)
|
if (IsDone == false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,14 +81,6 @@ namespace YooAsset
|
|||||||
_taskCompletionSource.TrySetResult(null);
|
_taskCompletionSource.TrySetResult(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 取消异步操作
|
|
||||||
/// </summary>
|
|
||||||
public virtual void Cancel()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException("Can not cancel operation !");
|
|
||||||
}
|
|
||||||
|
|
||||||
#region 异步编程相关
|
#region 异步编程相关
|
||||||
bool IEnumerator.MoveNext()
|
bool IEnumerator.MoveNext()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
namespace YooAsset
|
namespace YooAsset
|
||||||
{
|
{
|
||||||
public class GameAsyncOperation : AsyncOperationBase
|
public abstract class GameAsyncOperation : AsyncOperationBase
|
||||||
{
|
{
|
||||||
internal override void Start()
|
internal override void Start()
|
||||||
{
|
{
|
||||||
@@ -12,7 +12,7 @@ namespace YooAsset
|
|||||||
OnUpdate();
|
OnUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnStart() { }
|
protected abstract void OnStart();
|
||||||
protected virtual void OnUpdate() { }
|
protected abstract void OnUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user