1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 12:37:47 +08:00
osu-lazer/osu.Game/Online/Multiplayer/MultiplayerCountdown.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.4 KiB
C#
Raw Normal View History

// 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;
using MessagePack;
using osu.Game.Online.Multiplayer.Countdown;
namespace osu.Game.Online.Multiplayer
{
/// <summary>
/// Describes the current countdown in a <see cref="MultiplayerRoom"/>.
/// </summary>
[MessagePackObject]
[Union(0, typeof(MatchStartCountdown))] // IMPORTANT: Add rules to SignalRUnionWorkaroundResolver for new derived types.
2022-04-28 19:00:38 +08:00
[Union(1, typeof(ForceGameplayStartCountdown))]
2022-09-15 19:54:06 +08:00
[Union(2, typeof(ServerShuttingDownCountdown))]
public abstract class MultiplayerCountdown
{
/// <summary>
/// A unique identifier for this countdown.
/// </summary>
[Key(0)]
public int ID { get; set; }
/// <summary>
/// The amount of time remaining in the countdown.
/// </summary>
/// <remarks>
/// This is only sent once from the server upon initial retrieval of the <see cref="MultiplayerRoom"/> or via a <see cref="CountdownStartedEvent"/>.
/// </remarks>
[Key(1)]
public TimeSpan TimeRemaining { get; set; }
2022-09-05 19:13:23 +08:00
/// <summary>
/// Whether only a single instance of this <see cref="MultiplayerCountdown"/> type may be active at any one time.
/// </summary>
2022-09-11 17:50:51 +08:00
[IgnoreMember]
public virtual bool IsExclusive => true;
}
}