mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 17:17:24 +08:00
Add state for when user is ready for gameplay
This commit is contained in:
parent
882c310e2a
commit
8c3b541312
@ -65,5 +65,21 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode() => UserID.GetHashCode();
|
public override int GetHashCode() => UserID.GetHashCode();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this user has finished loading and can start gameplay.
|
||||||
|
/// </summary>
|
||||||
|
public bool CanStartGameplay()
|
||||||
|
{
|
||||||
|
switch (State)
|
||||||
|
{
|
||||||
|
case MultiplayerUserState.Loaded:
|
||||||
|
case MultiplayerUserState.ReadyForGameplay:
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,16 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
WaitingForLoad,
|
WaitingForLoad,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The user's client has marked itself as loaded and ready to begin gameplay.
|
/// The user has marked itself as loaded, but may still be adjusting settings prior to being ready for gameplay.
|
||||||
|
/// Players remaining in this state for an extended period of time will be automatically transitioned to the <see cref="Playing"/> state by the server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Loaded,
|
Loaded,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The user has finished adjusting settings and is ready to start gameplay.
|
||||||
|
/// </summary>
|
||||||
|
ReadyForGameplay,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The user is currently playing in a game. This is a reserved state, and is set by the server.
|
/// The user is currently playing in a game. This is a reserved state, and is set by the server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -112,6 +112,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MultiplayerUserState.Loaded:
|
case MultiplayerUserState.Loaded:
|
||||||
|
case MultiplayerUserState.ReadyForGameplay:
|
||||||
text.Text = "loaded";
|
text.Text = "loaded";
|
||||||
icon.Icon = FontAwesome.Solid.DotCircle;
|
icon.Icon = FontAwesome.Solid.DotCircle;
|
||||||
icon.Colour = colours.YellowLight;
|
icon.Colour = colours.YellowLight;
|
||||||
|
Loading…
Reference in New Issue
Block a user