mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Revert "Load SeasonalBackgroundLoader asynchronously"
This reverts commit 81ebcd8796
.
This commit is contained in:
@ -25,7 +25,6 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
private Bindable<Skin> skin;
|
private Bindable<Skin> skin;
|
||||||
private Bindable<BackgroundSource> mode;
|
private Bindable<BackgroundSource> mode;
|
||||||
private Bindable<IntroSequence> introSequence;
|
private Bindable<IntroSequence> introSequence;
|
||||||
private readonly SeasonalBackgroundLoader seasonalBackgroundLoader = new SeasonalBackgroundLoader();
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IBindable<WorkingBeatmap> beatmap { get; set; }
|
private IBindable<WorkingBeatmap> beatmap { get; set; }
|
||||||
@ -51,7 +50,7 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
|
|
||||||
currentDisplay = RNG.Next(0, background_count);
|
currentDisplay = RNG.Next(0, background_count);
|
||||||
|
|
||||||
LoadComponentAsync(seasonalBackgroundLoader, _ => LoadComponentAsync(createBackground(), display));
|
display(createBackground());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void display(Background newBackground)
|
private void display(Background newBackground)
|
||||||
@ -91,10 +90,6 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
{
|
{
|
||||||
switch (mode.Value)
|
switch (mode.Value)
|
||||||
{
|
{
|
||||||
case BackgroundSource.Seasonal:
|
|
||||||
newBackground = seasonalBackgroundLoader.LoadBackground(backgroundName);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BackgroundSource.Beatmap:
|
case BackgroundSource.Beatmap:
|
||||||
newBackground = new BeatmapBackground(beatmap.Value, backgroundName);
|
newBackground = new BeatmapBackground(beatmap.Value, backgroundName);
|
||||||
break;
|
break;
|
||||||
@ -105,18 +100,7 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
switch (mode.Value)
|
|
||||||
{
|
|
||||||
case BackgroundSource.Seasonal:
|
|
||||||
newBackground = seasonalBackgroundLoader.LoadBackground(backgroundName);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
newBackground = new Background(backgroundName);
|
newBackground = new Background(backgroundName);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
newBackground.Depth = currentDisplay;
|
newBackground.Depth = currentDisplay;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user