From 1ca2152e6191e0da98abdf034f1d50c20734fe7b Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 21 Apr 2021 23:22:36 +0900 Subject: [PATCH] Privatise + rename to SlaveGameplayClockContainer --- .../Spectate/MultiplayerSpectatorPlayer.cs | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectatorPlayer.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectatorPlayer.cs index 5af0d19a4d..69b38c61f7 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectatorPlayer.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectatorPlayer.cs @@ -37,27 +37,27 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate } protected override GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart) - => new SubGameplayClockContainer(slaveClock); - } + => new SlaveGameplayClockContainer(slaveClock); - public class SubGameplayClockContainer : GameplayClockContainer - { - public SubGameplayClockContainer(IClock sourceClock) - : base(sourceClock) + private class SlaveGameplayClockContainer : GameplayClockContainer { + public SlaveGameplayClockContainer(IClock sourceClock) + : base(sourceClock) + { + } + + protected override void Update() + { + // The slave clock's running state is controlled by the sync manager, but the local pausing state needs to be updated to stop gameplay. + if (SourceClock.IsRunning) + Start(); + else + Stop(); + + base.Update(); + } + + protected override GameplayClock CreateGameplayClock(IFrameBasedClock source) => new GameplayClock(source); } - - protected override void Update() - { - // The slave clock's running state is controlled by the sync manager, but the local pausing state needs to be updated to stop gameplay. - if (SourceClock.IsRunning) - Start(); - else - Stop(); - - base.Update(); - } - - protected override GameplayClock CreateGameplayClock(IFrameBasedClock source) => new GameplayClock(source); } }