From 3f27be1f330103ced3937de808107376b350bcd7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 21 Sep 2023 15:24:03 +0900 Subject: [PATCH] Replace most usages of `DecoupleableInterpolatingFramedClock` Except `FramedBeatmapClock`, which is the high-effort one. --- .../Visual/Gameplay/TestSceneStoryboard.cs | 4 +--- osu.Game/Screens/Menu/IntroTriangles.cs | 13 +++---------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboard.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboard.cs index a6663f3086..893b9f11f4 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboard.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboard.cs @@ -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? setUpStoryboard = null) diff --git a/osu.Game/Screens/Menu/IntroTriangles.cs b/osu.Game/Screens/Menu/IntroTriangles.cs index a9c86b10c4..808680b9e5 100644 --- a/osu.Game/Screens/Menu/IntroTriangles.cs +++ b/osu.Game/Screens/Menu/IntroTriangles.cs @@ -36,7 +36,6 @@ namespace osu.Game.Screens.Menu private Sample welcome; - private DecoupleableInterpolatingFramedClock decoupledClock; private TrianglesIntroSequence intro; public IntroTriangles([CanBeNull] Func 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(); }); } }