From 2433838d5887e84089496713857dbd8f12f797aa Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 8 Dec 2020 18:42:08 +0900 Subject: [PATCH] Add methods covering match start / end --- .../RealtimeMultiplayer/IMultiplayerClient.cs | 15 +++++++++++++++ .../RealtimeMultiplayer/IMultiplayerServer.cs | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/osu.Game/Online/RealtimeMultiplayer/IMultiplayerClient.cs b/osu.Game/Online/RealtimeMultiplayer/IMultiplayerClient.cs index e772ef39f9..1e59b62a9d 100644 --- a/osu.Game/Online/RealtimeMultiplayer/IMultiplayerClient.cs +++ b/osu.Game/Online/RealtimeMultiplayer/IMultiplayerClient.cs @@ -46,5 +46,20 @@ namespace osu.Game.Online.RealtimeMultiplayer /// The ID of the user performing a state change. /// The new state of the user. Task UserStateChanged(long userId, MultiplayerUserState state); + + /// + /// Signals that a match is to be started. Users in the state should begin loading gameplay at this point. + /// + Task LoadRequested(); + + /// + /// Signals that a match has started. All loaded users' clients should now start gameplay as soon as possible. + /// + Task MatchStarted(); + + /// + /// Signals that the match has ended, all players have finished and results are ready to be displayed. + /// + Task ResultsReady(); } } diff --git a/osu.Game/Online/RealtimeMultiplayer/IMultiplayerServer.cs b/osu.Game/Online/RealtimeMultiplayer/IMultiplayerServer.cs index ad4aa5d2c2..eb9eddbdf5 100644 --- a/osu.Game/Online/RealtimeMultiplayer/IMultiplayerServer.cs +++ b/osu.Game/Online/RealtimeMultiplayer/IMultiplayerServer.cs @@ -37,5 +37,10 @@ namespace osu.Game.Online.RealtimeMultiplayer /// The proposed new state. /// If the state change requested is not valid, given the previous state or room state. Task ChangeState(MultiplayerUserState newState); + + /// + /// As the host of a room, start the match. + /// + Task StartMatch(); } }