1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-24 15:17:46 +08:00

Replace most usages of DecoupleableInterpolatingFramedClock

Except `FramedBeatmapClock`, which is the high-effort one.
This commit is contained in:
Dean Herbert 2023-09-21 15:24:03 +09:00
parent 600651795b
commit 3f27be1f33
2 changed files with 4 additions and 13 deletions

View File

@ -106,14 +106,12 @@ namespace osu.Game.Tests.Visual.Gameplay
if (storyboard != null)
storyboardContainer.Remove(storyboard, true);
var decoupledClock = new DecoupleableInterpolatingFramedClock { IsCoupled = true };
storyboardContainer.Clock = decoupledClock;
storyboardContainer.Clock = new FramedClock(Beatmap.Value.Track);
storyboard = toLoad.CreateDrawable(SelectedMods.Value);
storyboard.Passing = false;
storyboardContainer.Add(storyboard);
decoupledClock.ChangeSource(Beatmap.Value.Track);
}
private void loadStoryboard(string filename, Action<Storyboard>? setUpStoryboard = null)

View File

@ -36,7 +36,6 @@ namespace osu.Game.Screens.Menu
private Sample welcome;
private DecoupleableInterpolatingFramedClock decoupledClock;
private TrianglesIntroSequence intro;
public IntroTriangles([CanBeNull] Func<MainMenu> createNextScreen = null)
@ -59,18 +58,12 @@ namespace osu.Game.Screens.Menu
{
PrepareMenuLoad();
decoupledClock = new DecoupleableInterpolatingFramedClock
{
IsCoupled = false
};
if (UsingThemedIntro)
decoupledClock.ChangeSource(Track);
var decouplingClock = new DecouplingClock(UsingThemedIntro ? Track : null);
LoadComponentAsync(intro = new TrianglesIntroSequence(logo, () => FadeInBackground())
{
RelativeSizeAxes = Axes.Both,
Clock = decoupledClock,
Clock = new InterpolatingFramedClock(decouplingClock),
LoadMenu = LoadMenu
}, _ =>
{
@ -94,7 +87,7 @@ namespace osu.Game.Screens.Menu
StartTrack();
// no-op for the case of themed intro, no harm in calling for both scenarios as a safety measure.
decoupledClock.Start();
decouplingClock.Start();
});
}
}