simple refactoring

This commit is contained in:
Mikhail 2024-08-24 21:02:53 +08:00
parent 6c1e999a31
commit 8723c4a706
2 changed files with 5 additions and 8 deletions

View File

@ -699,10 +699,10 @@ namespace DCFApixels.DragonECS
_source = source; _source = source;
_mask = mask; _mask = mask;
_sortIncBuffer = new UnsafeArray<int>(_mask._inc.Length, true); _sortIncBuffer = new UnsafeArray<int>(_mask._inc.Length);
_sortExcBuffer = new UnsafeArray<int>(_mask._exc.Length, true); _sortExcBuffer = new UnsafeArray<int>(_mask._exc.Length);
_sortIncChunckBuffer = new UnsafeArray<EcsMaskChunck>(_mask._incChunckMasks.Length, true); _sortIncChunckBuffer = new UnsafeArray<EcsMaskChunck>(_mask._incChunckMasks.Length);
_sortExcChunckBuffer = new UnsafeArray<EcsMaskChunck>(_mask._excChunckMasks.Length, true); _sortExcChunckBuffer = new UnsafeArray<EcsMaskChunck>(_mask._excChunckMasks.Length);
for (int i = 0; i < _sortIncBuffer.Length; i++) for (int i = 0; i < _sortIncBuffer.Length; i++)
{ {

View File

@ -113,10 +113,7 @@ namespace DCFApixels.DragonECS
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
get get
{ {
if (_isEnableAutoReleaseDelEntBuffer) ReleaseDelEntityBufferAll();
{
ReleaseDelEntityBufferAll();
}
return _entityDispenser.UsedToEcsSpan(id); return _entityDispenser.UsedToEcsSpan(id);
} }
} }