1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:12:57 +08:00

Load SeasonalBackgroundLoader asynchronously

This commit is contained in:
Max Hübner 2020-10-29 17:43:10 +01:00
parent 907e1921c7
commit bf4d99dfe7

View File

@ -25,6 +25,7 @@ namespace osu.Game.Screens.Backgrounds
private Bindable<Skin> skin;
private Bindable<BackgroundSource> mode;
private Bindable<IntroSequence> introSequence;
private readonly SeasonalBackgroundLoader seasonalBackgroundLoader = new SeasonalBackgroundLoader();
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; }
@ -50,7 +51,7 @@ namespace osu.Game.Screens.Backgrounds
currentDisplay = RNG.Next(0, background_count);
display(createBackground());
LoadComponentAsync(seasonalBackgroundLoader, _ => LoadComponentAsync(createBackground(), display));
}
private void display(Background newBackground)