26 lines
678 B
C#
26 lines
678 B
C#
|
|
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;
|
||
|
|
}
|
||
|
|
}
|