mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 09:54:35 +08:00
Update EcsPool.cs
This commit is contained in:
parent
f809fd8c71
commit
e95a6225a7
@ -396,14 +396,15 @@ namespace DCFApixels.DragonECS
|
|||||||
#endif
|
#endif
|
||||||
_isDenseEntitiesDelayedValid = true;
|
_isDenseEntitiesDelayedValid = true;
|
||||||
}
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
private int GetFreeItemIndex(int entityID)
|
private int GetFreeItemIndex(int entityID)
|
||||||
{
|
{
|
||||||
if (_denseEntitiesDelayedCount >= _capacity - 1)
|
if (_denseEntitiesDelayedCount >= _capacity)
|
||||||
{
|
{
|
||||||
UpdateDenseEntities();
|
UpdateDenseEntities();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_itemsCount >= _capacity - 1)
|
if (_itemsCount + 1 >= _capacity)
|
||||||
{
|
{
|
||||||
Resize(_items.Length << 1);
|
Resize(_items.Length << 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user