mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 09:54:35 +08:00
fix world id management
This commit is contained in:
parent
bc1075eada
commit
7cf6894476
@ -153,6 +153,10 @@ namespace DCFApixels.DragonECS
|
|||||||
if (itemIndex != 0)
|
if (itemIndex != 0)
|
||||||
{
|
{
|
||||||
_interface.OnDestroy(ref _items[itemIndex], _worlds[worldID]);
|
_interface.OnDestroy(ref _items[itemIndex], _worlds[worldID]);
|
||||||
|
if(_recycledItemsCount >= _recycledItems.Length)
|
||||||
|
{
|
||||||
|
Array.Resize(ref _recycledItems, _recycledItems.Length << 1);
|
||||||
|
}
|
||||||
_recycledItems[_recycledItemsCount++] = itemIndex;
|
_recycledItems[_recycledItemsCount++] = itemIndex;
|
||||||
itemIndex = 0;
|
itemIndex = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user