mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 08:02:55 +08:00
Cleanup.
This commit is contained in:
parent
cbf188c293
commit
803bb3c780
@ -12,7 +12,6 @@ namespace osu.Game.Screens.Backgrounds
|
||||
private int currentDisplay;
|
||||
private const int background_count = 5;
|
||||
|
||||
|
||||
private string backgroundName => $@"Menu/menu-background-{currentDisplay % background_count + 1}";
|
||||
|
||||
private Background current;
|
||||
@ -23,12 +22,12 @@ namespace osu.Game.Screens.Backgrounds
|
||||
display(new Background(backgroundName));
|
||||
}
|
||||
|
||||
private void display(Background b)
|
||||
private void display(Background newBackground)
|
||||
{
|
||||
current?.FadeOut(800, EasingTypes.OutQuint);
|
||||
current?.Expire();
|
||||
|
||||
Add(current = b);
|
||||
Add(current = newBackground);
|
||||
}
|
||||
|
||||
public void Next()
|
||||
@ -37,4 +36,4 @@ namespace osu.Game.Screens.Backgrounds
|
||||
LoadComponentAsync(new Background(backgroundName) { Depth = currentDisplay }, display);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user