Use switch statement to be more explicit about state

This commit is contained in:
smoogipoo 2021-06-11 19:23:25 +09:00
parent 0a8daab4f7
commit 9f163f7f20

View File

@ -149,10 +149,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
private void onMasterStateChanged(ValueChangedEvent<MasterClockState> state)
{
if (state.NewValue == MasterClockState.Synchronised)
masterClockContainer.Start();
else
masterClockContainer.Stop();
switch (state.NewValue)
{
case MasterClockState.Synchronised:
masterClockContainer.Start();
break;
case MasterClockState.TooFarAhead:
masterClockContainer.Stop();
break;
}
}
protected override void OnUserStateChanged(int userId, SpectatorState spectatorState)