// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Threading.Tasks; namespace osu.Game.Online.RealtimeMultiplayer { /// /// An interface defining a multiplayer client instance. /// public interface IMultiplayerClient { /// /// Signals that the room has changed state. /// /// The state of the room. Task RoomStateChanged(MultiplayerRoomState state); /// /// Signals that a user has joined the room. /// /// The user. Task UserJoined(MultiplayerRoomUser user); /// /// Signals that a user has left the room. /// /// The user. Task UserLeft(MultiplayerRoomUser user); /// /// Signal that the host of the room has changed. /// /// The user ID of the new host. Task HostChanged(int userId); /// /// Signals that the settings for this room have changed. /// /// The updated room settings. Task SettingsChanged(MultiplayerRoomSettings newSettings); /// /// Signals that a user in this room changed their state. /// /// The ID of the user performing a state change. /// The new state of the user. Task UserStateChanged(int userId, MultiplayerUserState state); /// /// Signals that a match is to be started. This will *only* be sent to clients which are to begin loading at this point. /// Task LoadRequested(); /// /// Signals that a match has started. All users in the state should begin 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(); } }