1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 08:02:55 +08:00
This commit is contained in:
Dan Balasescu 2017-06-26 23:05:35 +09:00 committed by GitHub
parent cbf188c293
commit 803bb3c780

View File

@ -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);
}
}
}
}