mirror of
https://github.com/ppy/osu.git
synced 2025-03-18 06:27:18 +08:00
Move bindable binding to LoadComplete
and remove unnecessary unbind
This commit is contained in:
parent
ea8e49c543
commit
671a3d47b8
@ -24,8 +24,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
userJoinedSample = audio.Samples.Get(@"Multiplayer/player-joined");
|
||||
userLeftSample = audio.Samples.Get(@"Multiplayer/player-left");
|
||||
userKickedSample = audio.Samples.Get(@"Multiplayer/player-kicked");
|
||||
}
|
||||
|
||||
Host.ValueChanged += hostChanged;
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Host.BindValueChanged(hostChanged);
|
||||
}
|
||||
|
||||
protected override void UserJoined(MultiplayerRoomUser user)
|
||||
@ -56,12 +61,5 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
|
||||
hostChangedSample?.Play();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
Host.ValueChanged -= hostChanged;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user