mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
rename DeclareRunner to GetRunnerInstance
This commit is contained in:
parent
54bcda5891
commit
fbda99c60a
@ -67,7 +67,7 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Get Process
|
#region GetProcess
|
||||||
public EcsProcess<T> GetProcess<T>() where T : IEcsProcess
|
public EcsProcess<T> GetProcess<T>() where T : IEcsProcess
|
||||||
{
|
{
|
||||||
Type type = typeof(T);
|
Type type = typeof(T);
|
||||||
@ -85,8 +85,8 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Declare/Get Runner
|
#region GetRunner
|
||||||
public TRunner DeclareRunner<TRunner>() where TRunner : EcsRunner, IEcsRunner, new()
|
public TRunner GetRunnerInstance<TRunner>() where TRunner : EcsRunner, IEcsRunner, new()
|
||||||
{
|
{
|
||||||
Type runnerType = typeof(TRunner);
|
Type runnerType = typeof(TRunner);
|
||||||
if (_runners.TryGetValue(runnerType, out IEcsRunner result))
|
if (_runners.TryGetValue(runnerType, out IEcsRunner result))
|
||||||
@ -144,9 +144,9 @@ namespace DCFApixels.DragonECS
|
|||||||
_injector = _injectorBuilder.Build(this);
|
_injector = _injectorBuilder.Build(this);
|
||||||
_injectorBuilder = null;
|
_injectorBuilder = null;
|
||||||
|
|
||||||
DeclareRunner<EcsPreInitRunner>().PreInit();
|
GetRunnerInstance<EcsPreInitRunner>().PreInit();
|
||||||
DeclareRunner<EcsInitRunner>().Init();
|
GetRunnerInstance<EcsInitRunner>().Init();
|
||||||
_runRunnerCache = DeclareRunner<EcsRunRunner>();
|
_runRunnerCache = GetRunnerInstance<EcsRunRunner>();
|
||||||
|
|
||||||
_isInit = true;
|
_isInit = true;
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ namespace DCFApixels.DragonECS
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_isDestoryed = true;
|
_isDestoryed = true;
|
||||||
DeclareRunner<EcsDestroyRunner>().Destroy();
|
GetRunnerInstance<EcsDestroyRunner>().Destroy();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
public override void Declare(EcsPipeline pipeline)
|
public override void Declare(EcsPipeline pipeline)
|
||||||
{
|
{
|
||||||
pipeline.DeclareRunner<T>();
|
pipeline.GetRunnerInstance<T>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class LayerList : IEnumerable<string>
|
public class LayerList : IEnumerable<string>
|
||||||
|
Loading…
Reference in New Issue
Block a user