NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/SubSystems/LoadingExecutorManager.cs

26 lines
678 B
C#
Raw Normal View History

2023-08-22 19:08:45 +08:00
using Framework;
namespace Gameplay.SubSystems
{
public class LoadingExecutorManager : GlobalSystem<LoadingExecutorManager>
{
private LoadingExecutor _currentloadingExecutor;
public void ExecuteLoading(LoadingExecutor executer)
{
if (executer == null)
{
return;
}
if (_currentloadingExecutor != null && _currentloadingExecutor.IsExcuting())
{
return;
}
_currentloadingExecutor = executer;
_currentloadingExecutor.Excute();
}
public LoadingExecutor CurrentExcutor => _currentloadingExecutor;
}
}