mirror of
https://github.com/ppy/osu
synced 2025-01-24 14:53:18 +00:00
Use switch statement to be more explicit about state
This commit is contained in:
parent
0a8daab4f7
commit
9f163f7f20
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user