mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Update async load usage to new style.
This commit is contained in:
@ -27,21 +27,13 @@ namespace osu.Game.Screens
|
||||
return false;
|
||||
}
|
||||
|
||||
private Framework.Game game;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(Framework.Game game)
|
||||
{
|
||||
this.game = game;
|
||||
}
|
||||
|
||||
public override bool Push(Screen screen)
|
||||
{
|
||||
// When trying to push a non-loaded GameMode, load it asynchronously and re-invoke Push
|
||||
// once it's done.
|
||||
if (screen.LoadState == LoadState.NotLoaded)
|
||||
{
|
||||
screen.LoadAsync(game, d => Push((BackgroundScreen)d));
|
||||
LoadComponentAsync(screen, d => Push((BackgroundScreen)d));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user