mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
fix
This commit is contained in:
parent
8ac45e7b17
commit
bdecd86e00
@ -360,7 +360,8 @@ namespace DCFApixels.DragonECS
|
|||||||
int delCount = 0;
|
int delCount = 0;
|
||||||
foreach (var e in Entities)
|
foreach (var e in Entities)
|
||||||
{
|
{
|
||||||
if (_entities[e].componentsCount <= 0)
|
ref var ent = ref _entities[e];
|
||||||
|
if (ent.componentsCount <= 0 && ent.isUsed)
|
||||||
{
|
{
|
||||||
DelEntity(e);
|
DelEntity(e);
|
||||||
delCount++;
|
delCount++;
|
||||||
|
Loading…
Reference in New Issue
Block a user