mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 17:02:55 +08:00
Avoid LINQ in update
This commit is contained in:
parent
0aa17e7c95
commit
b83aa0bd76
@ -328,10 +328,10 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
return;
|
||||
|
||||
// Move the rectangle to cover the items
|
||||
RectangleF selectionRect = ToLocalSpace(selectedBlueprints.First().SelectionQuad).AABBFloat;
|
||||
RectangleF selectionRect = ToLocalSpace(selectedBlueprints[0].SelectionQuad).AABBFloat;
|
||||
|
||||
foreach (var blueprint in selectedBlueprints.Skip(1))
|
||||
selectionRect = RectangleF.Union(selectionRect, ToLocalSpace(blueprint.SelectionQuad).AABBFloat);
|
||||
for (int i = 1; i < selectedBlueprints.Count; i++)
|
||||
selectionRect = RectangleF.Union(selectionRect, ToLocalSpace(selectedBlueprints[i].SelectionQuad).AABBFloat);
|
||||
|
||||
selectionRect = selectionRect.Inflate(5f);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user