mirror of
				https://github.com/MaddyThorson/StrawberryBF.git
				synced 2025-11-04 01:41:33 +08:00 
			
		
		
		
	Moved Entity <=> operator for now since it was breaking list remove
This commit is contained in:
		@ -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)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user