mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:42:58 +08:00
Add basic structure for multiplayer state and model components
This commit is contained in:
parent
a5e2509d52
commit
be4a668e0b
19
osu.Game/Online/RealtimeMultiplayer/ISpectatorClient.cs
Normal file
19
osu.Game/Online/RealtimeMultiplayer/ISpectatorClient.cs
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface defining a spectator client instance.
|
||||
/// </summary>
|
||||
public interface IMultiplayerClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Signals that the room has changed state.
|
||||
/// </summary>
|
||||
/// <param name="state">The state of the room.</param>
|
||||
Task RoomStateChanged(MultiplayerRoomState state);
|
||||
}
|
||||
}
|
13
osu.Game/Online/RealtimeMultiplayer/ISpectatorServer.cs
Normal file
13
osu.Game/Online/RealtimeMultiplayer/ISpectatorServer.cs
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
namespace osu.Game.Online.RealtimeMultiplayer
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface defining the spectator server instance.
|
||||
/// </summary>
|
||||
public interface IMultiplayerServer
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
}
|
15
osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs
Normal file
15
osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Online.RealtimeMultiplayer
|
||||
{
|
||||
[Serializable]
|
||||
public class MultiplayerRoom
|
||||
{
|
||||
public long RoomID { get; set; }
|
||||
|
||||
public MultiplayerRoomState State { get; set; }
|
||||
}
|
||||
}
|
17
osu.Game/Online/RealtimeMultiplayer/MultiplayerRoomState.cs
Normal file
17
osu.Game/Online/RealtimeMultiplayer/MultiplayerRoomState.cs
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
namespace osu.Game.Online.RealtimeMultiplayer
|
||||
{
|
||||
/// <summary>
|
||||
/// The current overall state of a realtime multiplayer room.
|
||||
/// </summary>
|
||||
public enum MultiplayerRoomState
|
||||
{
|
||||
Open,
|
||||
WaitingForLoad,
|
||||
Playing,
|
||||
WaitingForResults,
|
||||
Closed
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user