mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Add smooth fading between audio tracks on transition
This commit is contained in:
@ -12,6 +12,7 @@ using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.IO.Archives;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
@ -60,6 +61,9 @@ namespace osu.Game.Screens.Menu
|
||||
[Resolved]
|
||||
private AudioManager audio { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the <see cref="Track"/> is provided by osu! resources, rather than a user beatmap.
|
||||
/// Only valid during or after <see cref="LogoArriving"/>.
|
||||
@ -167,6 +171,9 @@ namespace osu.Game.Screens.Menu
|
||||
Track = initialBeatmap.Track;
|
||||
UsingThemedIntro = !initialBeatmap.Track.IsDummyDevice;
|
||||
|
||||
// ensure the track starts at maximum volume
|
||||
musicController.CurrentTrack.FinishTransforms();
|
||||
|
||||
logo.MoveTo(new Vector2(0.5f));
|
||||
logo.ScaleTo(Vector2.One);
|
||||
logo.Hide();
|
||||
|
Reference in New Issue
Block a user