mirror of
https://github.com/osukey/osukey.git
synced 2025-05-23 06:27:24 +09: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…
x
Reference in New Issue
Block a user