mirror of
https://github.com/ppy/osu
synced 2025-01-09 15:49:32 +00:00
Use switch for screen construction
This commit is contained in:
parent
66ae6e58d1
commit
dc5ee31d94
@ -433,10 +433,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
Debug.Assert(client.LocalUser != null);
|
||||
|
||||
if (client.LocalUser.State == MultiplayerUserState.Spectating)
|
||||
return new MultiSpectatorScreen(client.CurrentMatchPlayingUserIds.ToArray());
|
||||
int[] userIds = client.CurrentMatchPlayingUserIds.ToArray();
|
||||
|
||||
return new MultiplayerPlayer(SelectedItem.Value, client.CurrentMatchPlayingUserIds.ToArray());
|
||||
switch (client.LocalUser.State)
|
||||
{
|
||||
case MultiplayerUserState.Spectating:
|
||||
return new MultiSpectatorScreen(userIds);
|
||||
|
||||
default:
|
||||
return new MultiplayerPlayer(SelectedItem.Value, userIds);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
Loading…
Reference in New Issue
Block a user