mirror of
https://github.com/MaddyThorson/StrawberryBF.git
synced 2025-04-12 03:16:05 +08:00
Moved Entity <=> operator for now since it was breaking list remove
This commit is contained in:
parent
9bb6ac6a73
commit
228295649e
@ -425,5 +425,10 @@ namespace Strawberry
|
|||||||
{
|
{
|
||||||
Draw.Rect(SceneHitbox, color);
|
Draw.Rect(SceneHitbox, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static public int Compare(Entity a, Entity b)
|
||||||
|
{
|
||||||
|
return a.Depth <=> b.Depth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,8 +97,6 @@ namespace Strawberry
|
|||||||
{
|
{
|
||||||
for (let e in toRemove)
|
for (let e in toRemove)
|
||||||
{
|
{
|
||||||
Calc.Log(scope => e.GetType().GetName);
|
|
||||||
|
|
||||||
entities.Remove(e);
|
entities.Remove(e);
|
||||||
UntrackEntity(e);
|
UntrackEntity(e);
|
||||||
e.[Friend]Removed();
|
e.[Friend]Removed();
|
||||||
@ -117,6 +115,8 @@ namespace Strawberry
|
|||||||
TrackEntity(e);
|
TrackEntity(e);
|
||||||
e.[Friend]Added(this);
|
e.[Friend]Added(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entities.Sort(scope => Entity.Compare);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let e in entities)
|
for (let e in entities)
|
||||||
|
Loading…
Reference in New Issue
Block a user