simple rafactoring

This commit is contained in:
Mikhail 2024-08-05 11:17:26 +08:00
parent e42d2edbbf
commit 108fb6c41b
3 changed files with 8 additions and 8 deletions

View File

@ -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)
{

View File

@ -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);

View File

@ -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);