mirror of https://github.com/ppy/osu
Add xmldoc coverage of MultiplayerRoom
This commit is contained in:
parent
4f449ba821
commit
42b1e9d6a4
|
@ -9,14 +9,28 @@ namespace osu.Game.Online.RealtimeMultiplayer
|
|||
[Serializable]
|
||||
public class MultiplayerRoom
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID of the room, used for database persistence.
|
||||
/// </summary>
|
||||
public long RoomID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The current state of the room (ie. whether it is in progress or otherwise).
|
||||
/// </summary>
|
||||
public MultiplayerRoomState State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// All currently enforced game settings for this room.
|
||||
/// </summary>
|
||||
public MultiplayerRoomSettings Settings { get; set; }
|
||||
|
||||
private List<MultiplayerRoomUser> users = new List<MultiplayerRoomUser>();
|
||||
|
||||
private object writeLock = new object();
|
||||
|
||||
/// <summary>
|
||||
/// All users which are currently in this room, in any state.
|
||||
/// </summary>
|
||||
public IReadOnlyList<MultiplayerRoomUser> Users
|
||||
{
|
||||
get
|
||||
|
@ -26,6 +40,9 @@ public IReadOnlyList<MultiplayerRoomUser> Users
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Join a new user to this room.
|
||||
/// </summary>
|
||||
public MultiplayerRoomUser Join(int userId)
|
||||
{
|
||||
var user = new MultiplayerRoomUser(userId);
|
||||
|
@ -33,6 +50,9 @@ public MultiplayerRoomUser Join(int userId)
|
|||
return user;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove a user from this room.
|
||||
/// </summary>
|
||||
public MultiplayerRoomUser Leave(int userId)
|
||||
{
|
||||
MultiplayerRoomUser user = null;
|
||||
|
@ -48,8 +68,6 @@ public MultiplayerRoomUser Leave(int userId)
|
|||
return user;
|
||||
}
|
||||
|
||||
private object writeLock = new object();
|
||||
|
||||
/// <summary>
|
||||
/// Perform an update on this room in a thread-safe manner.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue