mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
update
This commit is contained in:
parent
cfc1ffe9a6
commit
e4dc76e037
@ -368,7 +368,7 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EcsPipeline pipeline = new EcsPipeline(allSystems, Configs.Instance.GetContainer(), Injections.Instance);
|
EcsPipeline pipeline = new EcsPipeline((ReadOnlySpan<IEcsProcess>)allSystems, Configs.Instance.GetContainer(), Injections.Instance);
|
||||||
foreach (var item in _initDeclaredRunners)
|
foreach (var item in _initDeclaredRunners)
|
||||||
{
|
{
|
||||||
item.Declare(pipeline);
|
item.Declare(pipeline);
|
||||||
|
@ -78,21 +78,25 @@ namespace DCFApixels.DragonECS
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
public EcsPipeline(IEnumerable<IEcsProcess> systems, IConfigContainer configs = null, Injector.InjectionList injectionList = null)
|
public EcsPipeline(ReadOnlySpan<IEcsProcess> systems, IConfigContainer configs = null, Injector.InjectionList injectionList = null) :
|
||||||
|
this(systems.ToArray(), configs, injectionList)
|
||||||
|
{ }
|
||||||
|
public EcsPipeline(IEnumerable<IEcsProcess> systems, IConfigContainer configs = null, Injector.InjectionList injectionList = null) :
|
||||||
|
this(systems.ToArray(), configs, injectionList)
|
||||||
|
{ }
|
||||||
|
private EcsPipeline(IEcsProcess[] systems, IConfigContainer configs, Injector.InjectionList injectionList)
|
||||||
{
|
{
|
||||||
if(systems == null) { Throw.ArgumentNull(nameof(systems)); }
|
if (configs == null)
|
||||||
|
|
||||||
if(configs == null)
|
|
||||||
{
|
{
|
||||||
configs = new ConfigContainer();
|
configs = new ConfigContainer();
|
||||||
}
|
}
|
||||||
if(injectionList == null)
|
if (injectionList == null)
|
||||||
{
|
{
|
||||||
injectionList = Injector.InjectionList._Empty_Internal;
|
injectionList = Injector.InjectionList._Empty_Internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
_configs = configs;
|
_configs = configs;
|
||||||
_allSystems = systems.ToArray();
|
_allSystems = systems;
|
||||||
|
|
||||||
var members = GetProcess<IEcsPipelineMember>();
|
var members = GetProcess<IEcsPipelineMember>();
|
||||||
for (int i = 0; i < members.Length; i++)
|
for (int i = 0; i < members.Length; i++)
|
||||||
@ -103,7 +107,6 @@ namespace DCFApixels.DragonECS
|
|||||||
_injector = new Injector(this);
|
_injector = new Injector(this);
|
||||||
injectionList.InitInjectTo(_injector, this);
|
injectionList.InitInjectTo(_injector, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~EcsPipeline()
|
~EcsPipeline()
|
||||||
{
|
{
|
||||||
if (_isDestoryed) { return; }
|
if (_isDestoryed) { return; }
|
||||||
|
Loading…
Reference in New Issue
Block a user