Convert switch to if

This commit is contained in:
Max Hübner 2020-10-30 16:06:48 +01:00
parent d19dd4eef6
commit 6f6a8e2a8f

View File

@ -106,16 +106,10 @@ namespace osu.Game.Screens.Backgrounds
else else
newBackground = new Background(backgroundName); newBackground = new Background(backgroundName);
switch (seasonalBackgroundMode.Value) if (seasonalBackgroundMode.Value == SeasonalBackgroundMode.Always
|| seasonalBackgroundMode.Value == SeasonalBackgroundMode.Sometimes && seasonalBackgroundLoader.IsInSeason)
{ {
case SeasonalBackgroundMode.Sometimes: newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
if (seasonalBackgroundLoader.IsInSeason)
goto case SeasonalBackgroundMode.Always;
break;
case SeasonalBackgroundMode.Always:
newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
break;
} }
newBackground.Depth = currentDisplay; newBackground.Depth = currentDisplay;