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