mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2026-04-21 17:35:56 +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
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = Entities.Count - 1; i >= 0; i--)
|
||||
{
|
||||
DelEntity(Entities[i]);
|
||||
}
|
||||
|
||||
_isDestroyed = true;
|
||||
_listeners.InvokeOnWorldDestroy();
|
||||
_entityDispenser = null;
|
||||
@ -253,7 +259,6 @@ namespace DCFApixels.DragonECS
|
||||
//_entities - не обнуляется для работы entlong.IsAlive
|
||||
}
|
||||
}
|
||||
//public void Clear() { }
|
||||
#endregion
|
||||
|
||||
#region Getters
|
||||
|
||||
Loading…
Reference in New Issue
Block a user