mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Centralise track handling
This commit is contained in:
@ -30,19 +30,11 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
if (!resuming)
|
||||
{
|
||||
Beatmap.Value = IntroBeatmap;
|
||||
IntroBeatmap = null;
|
||||
|
||||
Welcome?.Play();
|
||||
|
||||
Scheduler.AddDelayed(delegate
|
||||
{
|
||||
// Only start the current track if it is the menu music. A beatmap's track is started when entering the Main Menu.
|
||||
if (MenuMusic.Value)
|
||||
{
|
||||
Track.Restart();
|
||||
Track = null;
|
||||
}
|
||||
StartTrack();
|
||||
|
||||
PrepareMenuLoad();
|
||||
|
||||
@ -57,8 +49,6 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
public override void OnSuspending(IScreen next)
|
||||
{
|
||||
Track = null;
|
||||
|
||||
this.FadeOut(300);
|
||||
base.OnSuspending(next);
|
||||
}
|
||||
|
Reference in New Issue
Block a user