1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 13:25:35 +08:00

Implement changes from review

Moves seeya back to the introscreen and uses a virtual string to change whenever it's needed and removed remainingTime()
This commit is contained in:
Shivam 2020-06-13 17:48:15 +02:00
parent 81c392b841
commit 4bfc16b4ce
2 changed files with 12 additions and 14 deletions

View File

@ -49,7 +49,9 @@ namespace osu.Game.Screens.Menu
private const int exit_delay = 3000;
protected SampleChannel Seeya { get; set; }
private SampleChannel seeya;
protected virtual string SeeyaSampleName => "Intro/seeya";
private LeasedBindable<WorkingBeatmap> beatmap;
@ -72,7 +74,7 @@ namespace osu.Game.Screens.Menu
MenuVoice = config.GetBindable<bool>(OsuSetting.MenuVoice);
MenuMusic = config.GetBindable<bool>(OsuSetting.MenuMusic);
Seeya = audio.Samples.Get(@"Intro/seeya");
seeya = audio.Samples.Get(SeeyaSampleName);
BeatmapSetInfo setInfo = null;
@ -124,7 +126,7 @@ namespace osu.Game.Screens.Menu
double fadeOutTime = exit_delay;
// we also handle the exit transition.
if (MenuVoice.Value)
Seeya.Play();
seeya.Play();
else
fadeOutTime = 500;

View File

@ -22,17 +22,15 @@ namespace osu.Game.Screens.Menu
private const double delay_step_two = 2142;
private SampleChannel welcome;
private SampleChannel pianoReverb;
protected override string SeeyaSampleName => "Intro/Welcome/seeya";
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{
Seeya = audio.Samples.Get(@"Intro/welcome/seeya");
if (MenuVoice.Value)
{
welcome = audio.Samples.Get(@"Intro/welcome/welcome");
pianoReverb = audio.Samples.Get(@"Intro/welcome/welcome_piano");
}
welcome = audio.Samples.Get(@"Intro/Welcome/welcome");
pianoReverb = audio.Samples.Get(@"Intro/Welcome/welcome_piano");
}
protected override void LogoArriving(OsuLogo logo, bool resuming)
@ -126,7 +124,7 @@ namespace osu.Game.Screens.Menu
Width = 750,
Height = 78,
Alpha = 0,
Texture = textures.Get(@"Welcome/welcome_text@2x")
Texture = textures.Get(@"Welcome/welcome_text")
},
};
}
@ -135,13 +133,11 @@ namespace osu.Game.Screens.Menu
{
base.LoadComplete();
double remainingTime() => delay_step_two - TransformDelay;
using (BeginDelayedSequence(0, true))
{
welcomeText.ResizeHeightTo(welcomeText.Height * 2, 500, Easing.In);
welcomeText.FadeIn(remainingTime());
welcomeText.ScaleTo(welcomeText.Scale + new Vector2(0.1f), remainingTime(), Easing.Out).OnComplete(_ => Expire());
welcomeText.FadeIn(delay_step_two);
welcomeText.ScaleTo(welcomeText.Scale + new Vector2(0.1f), delay_step_two, Easing.Out).OnComplete(_ => Expire());
}
}
}