mirror of
https://github.com/MaddyThorson/StrawberryBF.git
synced 2025-01-19 05:28:27 +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);
|
||||
}
|
||||
|
||||
static public int Compare(Entity a, Entity b)
|
||||
{
|
||||
return a.Depth <=> b.Depth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -97,8 +97,6 @@ namespace Strawberry
|
||||
{
|
||||
for (let e in toRemove)
|
||||
{
|
||||
Calc.Log(scope => e.GetType().GetName);
|
||||
|
||||
entities.Remove(e);
|
||||
UntrackEntity(e);
|
||||
e.[Friend]Removed();
|
||||
@ -117,6 +115,8 @@ namespace Strawberry
|
||||
TrackEntity(e);
|
||||
e.[Friend]Added(this);
|
||||
}
|
||||
|
||||
entities.Sort(scope => Entity.Compare);
|
||||
}
|
||||
|
||||
for (let e in entities)
|
||||
|
Loading…
Reference in New Issue
Block a user