mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
simple rafactoring
This commit is contained in:
parent
e42d2edbbf
commit
108fb6c41b
@ -56,6 +56,10 @@ namespace DCFApixels.DragonECS
|
||||
if (span.IsNull) { Throw.ArgumentNull(nameof(span)); }
|
||||
if (span.WorldID != WorldID) { Throw.Quiery_ArgumentDifferentWorldsException(); }
|
||||
#endif
|
||||
if (World.IsEnableReleaseDelEntBuffer)
|
||||
{
|
||||
World.ReleaseDelEntityBufferAll();
|
||||
}
|
||||
EcsSpan result;
|
||||
if (_lastWorldVersion != World.Version)
|
||||
{
|
||||
|
@ -58,6 +58,10 @@ namespace DCFApixels.DragonECS
|
||||
if (span.IsNull) { Throw.ArgumentNull(nameof(span)); }
|
||||
if (span.WorldID != WorldID) { Throw.Quiery_ArgumentDifferentWorldsException(); }
|
||||
#endif
|
||||
if (World.IsEnableReleaseDelEntBuffer)
|
||||
{
|
||||
World.ReleaseDelEntityBufferAll();
|
||||
}
|
||||
if (_lastWorldVersion != World.Version)
|
||||
{
|
||||
_aspect.GetIteratorFor(span).CopyTo(_filteredGroup);
|
||||
|
@ -22,10 +22,6 @@
|
||||
where TAspect : EcsAspect, new()
|
||||
{
|
||||
EcsWorld world = span.World;
|
||||
if (world.IsEnableReleaseDelEntBuffer)
|
||||
{
|
||||
world.ReleaseDelEntityBufferAll();
|
||||
}
|
||||
var executor = world.GetExecutor<EcsWhereExecutor<TAspect>>();
|
||||
aspect = executor.Aspect;
|
||||
return executor.ExecuteFor(span);
|
||||
@ -48,10 +44,6 @@
|
||||
where TAspect : EcsAspect, new()
|
||||
{
|
||||
EcsWorld world = span.World;
|
||||
if (world.IsEnableReleaseDelEntBuffer)
|
||||
{
|
||||
world.ReleaseDelEntityBufferAll();
|
||||
}
|
||||
var executor = world.GetExecutor<EcsWhereToGroupExecutor<TAspect>>();
|
||||
aspect = executor.Aspect;
|
||||
return executor.ExecuteFor(span);
|
||||
|
Loading…
Reference in New Issue
Block a user