mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
optimize pools
This commit is contained in:
parent
7de803cc12
commit
93e9a57c5c
@ -189,6 +189,10 @@ namespace DCFApixels.DragonECS
|
||||
void IEcsPoolImplementation.OnWorldDestroy() { }
|
||||
void IEcsPoolImplementation.OnReleaseDelEntityBuffer(ReadOnlySpan<int> buffer)
|
||||
{
|
||||
if (_itemsCount <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (var entityID in buffer)
|
||||
{
|
||||
TryDel(entityID);
|
||||
|
@ -167,6 +167,10 @@ namespace DCFApixels.DragonECS
|
||||
|
||||
void IEcsPoolImplementation.OnReleaseDelEntityBuffer(ReadOnlySpan<int> buffer)
|
||||
{
|
||||
if (_count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (var entityID in buffer)
|
||||
{
|
||||
TryDel(entityID);
|
||||
|
Loading…
Reference in New Issue
Block a user