mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:18:22 +08:00
Reduce enumerator overhead in GameplayLeaderboard
This commit is contained in:
parent
1cde18b895
commit
069af13aaf
@ -287,7 +287,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
|
|
||||||
double delay = 0;
|
double delay = 0;
|
||||||
|
|
||||||
foreach (var s in scoreFlowContainer.Children)
|
foreach (var s in scoreFlowContainer)
|
||||||
{
|
{
|
||||||
using (s.BeginDelayedSequence(delay))
|
using (s.BeginDelayedSequence(delay))
|
||||||
s.Show();
|
s.Show();
|
||||||
@ -384,7 +384,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
if (scoreFlowContainer == null)
|
if (scoreFlowContainer == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (var c in scoreFlowContainer.Children)
|
foreach (var c in scoreFlowContainer)
|
||||||
{
|
{
|
||||||
float topY = c.ToSpaceOfOtherDrawable(Vector2.Zero, scoreFlowContainer).Y;
|
float topY = c.ToSpaceOfOtherDrawable(Vector2.Zero, scoreFlowContainer).Y;
|
||||||
float bottomY = topY + LeaderboardScore.HEIGHT;
|
float bottomY = topY + LeaderboardScore.HEIGHT;
|
||||||
|
@ -128,7 +128,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
if (!scroll.IsScrolledToEnd()) fadeBottom -= panel_height;
|
if (!scroll.IsScrolledToEnd()) fadeBottom -= panel_height;
|
||||||
|
|
||||||
// logic is mostly shared with Leaderboard, copied here for simplicity.
|
// logic is mostly shared with Leaderboard, copied here for simplicity.
|
||||||
foreach (var c in Flow.Children)
|
foreach (var c in Flow)
|
||||||
{
|
{
|
||||||
float topY = c.ToSpaceOfOtherDrawable(Vector2.Zero, Flow).Y;
|
float topY = c.ToSpaceOfOtherDrawable(Vector2.Zero, Flow).Y;
|
||||||
float bottomY = topY + panel_height;
|
float bottomY = topY + panel_height;
|
||||||
|
Loading…
Reference in New Issue
Block a user