1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:47:24 +08:00

Merge if statements

This commit is contained in:
Dean Herbert 2020-03-30 18:56:35 +09:00
parent ec18fe1f9f
commit 113660b621

View File

@ -89,22 +89,19 @@ namespace osu.Game.Screens.Ranking
}
};
if (player != null)
if (player != null && allowRetry)
{
if (allowRetry)
buttons.Add(new RetryButton { Width = 300 });
AddInternal(new HotkeyRetryOverlay
{
buttons.Add(new RetryButton { Width = 300 });
AddInternal(new HotkeyRetryOverlay
Action = () =>
{
Action = () =>
{
if (!this.IsCurrentScreen()) return;
if (!this.IsCurrentScreen()) return;
player?.Restart();
},
});
}
player?.Restart();
},
});
}
}