mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 19:52:57 +08:00
Fix background appearing too late
This commit is contained in:
parent
4244024fc3
commit
ccb27082d5
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
|
using osu.Game.Screens.Backgrounds;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Menu
|
namespace osu.Game.Screens.Menu
|
||||||
@ -24,6 +25,13 @@ namespace osu.Game.Screens.Menu
|
|||||||
private SampleChannel pianoReverb;
|
private SampleChannel pianoReverb;
|
||||||
protected override string SeeyaSampleName => "Intro/Welcome/seeya";
|
protected override string SeeyaSampleName => "Intro/Welcome/seeya";
|
||||||
|
|
||||||
|
protected override BackgroundScreen CreateBackground() => background = new BackgroundScreenDefault(false)
|
||||||
|
{
|
||||||
|
Alpha = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
private BackgroundScreenDefault background;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
@ -44,6 +52,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
RelativeSizeAxes = Axes.Both
|
RelativeSizeAxes = Axes.Both
|
||||||
}, intro =>
|
}, intro =>
|
||||||
{
|
{
|
||||||
|
PrepareMenuLoad();
|
||||||
|
|
||||||
intro.LogoVisualisation.AddAmplitudeSource(pianoReverb);
|
intro.LogoVisualisation.AddAmplitudeSource(pianoReverb);
|
||||||
|
|
||||||
AddInternal(intro);
|
AddInternal(intro);
|
||||||
@ -54,21 +64,24 @@ namespace osu.Game.Screens.Menu
|
|||||||
Scheduler.AddDelayed(() =>
|
Scheduler.AddDelayed(() =>
|
||||||
{
|
{
|
||||||
StartTrack();
|
StartTrack();
|
||||||
PrepareMenuLoad();
|
|
||||||
|
const float fade_in_time = 200;
|
||||||
|
|
||||||
logo.ScaleTo(1);
|
logo.ScaleTo(1);
|
||||||
logo.FadeIn();
|
logo.FadeIn(fade_in_time);
|
||||||
|
|
||||||
Scheduler.Add(LoadMenu);
|
background.FadeIn(fade_in_time);
|
||||||
|
|
||||||
|
LoadMenu();
|
||||||
}, delay_step_two);
|
}, delay_step_two);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnSuspending(IScreen next)
|
public override void OnResuming(IScreen last)
|
||||||
{
|
{
|
||||||
this.FadeOut(300);
|
base.OnResuming(last);
|
||||||
base.OnSuspending(next);
|
background.FadeOut(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class WelcomeIntroSequence : Container
|
private class WelcomeIntroSequence : Container
|
||||||
|
Loading…
Reference in New Issue
Block a user