mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 21:13:01 +08:00
Merge pull request #19802 from peppy/improve-intro-timings
Improve intro timings when not using osu! theme
This commit is contained in:
commit
57f48ca4d0
@ -19,8 +19,11 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
protected override string BeatmapFile => "circles.osz";
|
||||
|
||||
public const double TRACK_START_DELAY_NON_THEMED = 1000;
|
||||
private const double track_start_delay_themed = 600;
|
||||
|
||||
private const double delay_for_menu = 2900;
|
||||
private const double delay_step_one = 2300;
|
||||
private const double delay_step_two = 600;
|
||||
|
||||
private Sample welcome;
|
||||
|
||||
@ -44,14 +47,16 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
welcome?.Play();
|
||||
|
||||
double trackStartDelay = UsingThemedIntro ? track_start_delay_themed : TRACK_START_DELAY_NON_THEMED;
|
||||
|
||||
Scheduler.AddDelayed(delegate
|
||||
{
|
||||
StartTrack();
|
||||
|
||||
PrepareMenuLoad();
|
||||
|
||||
Scheduler.AddDelayed(LoadMenu, delay_step_one);
|
||||
}, delay_step_two);
|
||||
Scheduler.AddDelayed(LoadMenu, delay_for_menu - trackStartDelay);
|
||||
}, trackStartDelay);
|
||||
|
||||
logo.ScaleTo(1);
|
||||
logo.FadeIn();
|
||||
|
@ -272,11 +272,17 @@ namespace osu.Game.Screens.Menu
|
||||
FadeInBackground(200);
|
||||
}
|
||||
|
||||
protected virtual void StartTrack()
|
||||
protected void StartTrack()
|
||||
{
|
||||
// Only start the current track if it is the menu music. A beatmap's track is started when entering the Main Menu.
|
||||
if (UsingThemedIntro)
|
||||
Track.Start();
|
||||
var drawableTrack = musicController.CurrentTrack;
|
||||
|
||||
drawableTrack.Start();
|
||||
|
||||
if (!UsingThemedIntro)
|
||||
{
|
||||
drawableTrack.VolumeTo(0).Then()
|
||||
.VolumeTo(1, 2000, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||
|
@ -84,9 +84,17 @@ namespace osu.Game.Screens.Menu
|
||||
return;
|
||||
|
||||
if (!UsingThemedIntro)
|
||||
{
|
||||
// If the user has requested no theme, fallback to the same intro voice and delay as IntroCircles.
|
||||
// The triangles intro voice and theme are combined which makes it impossible to use.
|
||||
welcome?.Play();
|
||||
Scheduler.AddDelayed(StartTrack, IntroCircles.TRACK_START_DELAY_NON_THEMED);
|
||||
}
|
||||
else
|
||||
StartTrack();
|
||||
|
||||
StartTrack();
|
||||
// no-op for the case of themed intro, no harm in calling for both scenarios as a safety measure.
|
||||
decoupledClock.Start();
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -99,11 +107,6 @@ namespace osu.Game.Screens.Menu
|
||||
intro.Expire();
|
||||
}
|
||||
|
||||
protected override void StartTrack()
|
||||
{
|
||||
decoupledClock.Start();
|
||||
}
|
||||
|
||||
private class TrianglesIntroSequence : CompositeDrawable
|
||||
{
|
||||
private readonly OsuLogo logo;
|
||||
|
Loading…
Reference in New Issue
Block a user