namespace YooAsset
{
public abstract class GameAsyncOperation : AsyncOperationBase
{
internal override void InternalOnStart()
{
OnStart();
}
internal override void InternalOnUpdate()
{
OnUpdate();
}
internal override void InternalOnAbort()
{
OnAbort();
}
internal override void InternalWaitForAsyncComplete()
{
OnWaitForAsyncComplete();
}
///
/// 异步操作开始
///
protected abstract void OnStart();
///
/// 异步操作更新
///
protected abstract void OnUpdate();
///
/// 异步操作终止
///
protected abstract void OnAbort();
///
/// 异步等待完成
///
protected virtual void OnWaitForAsyncComplete() { }
///
/// 异步操作系统是否繁忙
///
protected bool IsBusy()
{
return OperationSystem.IsBusy;
}
}
}