mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2026-04-22 01:45:55 +08:00
Squashed commit of the following:
commit6452850ff8Author: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Tue Mar 3 14:46:58 2026 +0800 improve entities cleanup commitdb6b1d209aAuthor: Karpik <artem19051664@gmail.com> Date: Tue Jan 27 22:46:58 2026 +0400 Remove components for every entity in world.Destroy() In my situation, it invokes IEcsComponentLifecycle<T> methods
This commit is contained in:
parent
f15e0b5ed1
commit
9bd7558bdd
@ -234,6 +234,12 @@ namespace DCFApixels.DragonECS
|
|||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = Entities.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
DelEntity(Entities[i]);
|
||||||
|
}
|
||||||
|
|
||||||
_isDestroyed = true;
|
_isDestroyed = true;
|
||||||
_listeners.InvokeOnWorldDestroy();
|
_listeners.InvokeOnWorldDestroy();
|
||||||
_entityDispenser = null;
|
_entityDispenser = null;
|
||||||
@ -253,7 +259,6 @@ namespace DCFApixels.DragonECS
|
|||||||
//_entities - не обнуляется для работы entlong.IsAlive
|
//_entities - не обнуляется для работы entlong.IsAlive
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//public void Clear() { }
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Getters
|
#region Getters
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user