mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 14:12:54 +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";
|
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_one = 2300;
|
||||||
private const double delay_step_two = 600;
|
|
||||||
|
|
||||||
private Sample welcome;
|
private Sample welcome;
|
||||||
|
|
||||||
@ -44,14 +47,16 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
welcome?.Play();
|
welcome?.Play();
|
||||||
|
|
||||||
|
double trackStartDelay = UsingThemedIntro ? track_start_delay_themed : TRACK_START_DELAY_NON_THEMED;
|
||||||
|
|
||||||
Scheduler.AddDelayed(delegate
|
Scheduler.AddDelayed(delegate
|
||||||
{
|
{
|
||||||
StartTrack();
|
StartTrack();
|
||||||
|
|
||||||
PrepareMenuLoad();
|
PrepareMenuLoad();
|
||||||
|
|
||||||
Scheduler.AddDelayed(LoadMenu, delay_step_one);
|
Scheduler.AddDelayed(LoadMenu, delay_for_menu - trackStartDelay);
|
||||||
}, delay_step_two);
|
}, trackStartDelay);
|
||||||
|
|
||||||
logo.ScaleTo(1);
|
logo.ScaleTo(1);
|
||||||
logo.FadeIn();
|
logo.FadeIn();
|
||||||
|
@ -272,11 +272,17 @@ namespace osu.Game.Screens.Menu
|
|||||||
FadeInBackground(200);
|
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.
|
var drawableTrack = musicController.CurrentTrack;
|
||||||
if (UsingThemedIntro)
|
|
||||||
Track.Start();
|
drawableTrack.Start();
|
||||||
|
|
||||||
|
if (!UsingThemedIntro)
|
||||||
|
{
|
||||||
|
drawableTrack.VolumeTo(0).Then()
|
||||||
|
.VolumeTo(1, 2000, Easing.OutQuint);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||||
|
@ -84,9 +84,17 @@ namespace osu.Game.Screens.Menu
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!UsingThemedIntro)
|
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();
|
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();
|
intro.Expire();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void StartTrack()
|
|
||||||
{
|
|
||||||
decoupledClock.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
private class TrianglesIntroSequence : CompositeDrawable
|
private class TrianglesIntroSequence : CompositeDrawable
|
||||||
{
|
{
|
||||||
private readonly OsuLogo logo;
|
private readonly OsuLogo logo;
|
||||||
|
Loading…
Reference in New Issue
Block a user