Update with proper playlist usage

This commit is contained in:
smoogipoo
2018-12-13 18:38:03 +09:00
parent 264bd0e2aa
commit 680a3e2aa4
8 changed files with 87 additions and 46 deletions

View File

@ -18,9 +18,6 @@ namespace osu.Game.Online.Multiplayer
[JsonProperty("id")]
public Bindable<int?> RoomID { get; } = new Bindable<int?>();
[JsonIgnore]
public readonly Bindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
[JsonProperty("name")]
public readonly Bindable<string> Name = new Bindable<string>("My awesome room!");
@ -52,15 +49,6 @@ namespace osu.Game.Online.Multiplayer
public Bindable<int?> MaxParticipants = new Bindable<int?>();
public Bindable<IEnumerable<User>> Participants = new Bindable<IEnumerable<User>>(Enumerable.Empty<User>());
public Room()
{
Beatmap.BindValueChanged(b =>
{
Playlist.Clear();
Playlist.Add(new PlaylistItem { Beatmap = b });
});
}
public void CopyFrom(Room other)
{
RoomID.Value = other.RoomID;