Add countdown classes

This commit is contained in:
Dan Balasescu 2022-04-21 22:56:24 +09:00
parent 41355384bd
commit cbb07d4011
3 changed files with 18 additions and 1 deletions

View 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 MessagePack;
namespace osu.Game.Online.Multiplayer
{
/// <summary>
/// A <see cref="MultiplayerCountdown"/> indicating that gameplay will start after a given period of time.
/// </summary>
[MessagePackObject]
public class GameplayStartCountdown : MultiplayerCountdown
{
}
}

View File

@ -14,6 +14,7 @@ namespace osu.Game.Online.Multiplayer
/// </summary> /// </summary>
[MessagePackObject] [MessagePackObject]
[Union(0, typeof(MatchStartCountdown))] // IMPORTANT: Add rules to SignalRUnionWorkaroundResolver for new derived types. [Union(0, typeof(MatchStartCountdown))] // IMPORTANT: Add rules to SignalRUnionWorkaroundResolver for new derived types.
[Union(1, typeof(GameplayStartCountdown))]
public abstract class MultiplayerCountdown public abstract class MultiplayerCountdown
{ {
/// <summary> /// <summary>

View File

@ -24,7 +24,8 @@ namespace osu.Game.Online
(typeof(CountdownChangedEvent), typeof(MatchServerEvent)), (typeof(CountdownChangedEvent), typeof(MatchServerEvent)),
(typeof(TeamVersusRoomState), typeof(MatchRoomState)), (typeof(TeamVersusRoomState), typeof(MatchRoomState)),
(typeof(TeamVersusUserState), typeof(MatchUserState)), (typeof(TeamVersusUserState), typeof(MatchUserState)),
(typeof(MatchStartCountdown), typeof(MultiplayerCountdown)) (typeof(MatchStartCountdown), typeof(MultiplayerCountdown)),
(typeof(GameplayStartCountdown), typeof(MultiplayerCountdown))
}; };
} }
} }