1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 08:52:54 +08:00
osu-lazer/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/ISyncManager.cs

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

43 lines
1.6 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;
2021-06-11 18:15:53 +08:00
using osu.Framework.Bindables;
using osu.Game.Screens.Play;
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
{
/// <summary>
/// Manages the synchronisation between one or more <see cref="ISpectatorPlayerClock"/>s in relation to a master clock.
/// </summary>
public interface ISyncManager
{
2021-06-11 18:15:53 +08:00
/// <summary>
/// An event which is invoked when gameplay is ready to start.
/// </summary>
2022-08-22 20:52:43 +08:00
event Action? ReadyToStart;
2021-06-11 18:15:53 +08:00
/// <summary>
/// The master clock which player clocks should synchronise to.
/// </summary>
GameplayClockContainer MasterClock { get; }
/// <summary>
2021-06-11 18:15:53 +08:00
/// An event which is invoked when the state of <see cref="MasterClock"/> is changed.
/// </summary>
2021-06-11 18:15:53 +08:00
IBindable<MasterClockState> MasterState { get; }
/// <summary>
/// Create a new managed <see cref="ISpectatorPlayerClock"/>.
/// </summary>
/// <returns>The newly created <see cref="ISpectatorPlayerClock"/>.</returns>
ISpectatorPlayerClock CreateManagedClock();
/// <summary>
/// Removes an <see cref="ISpectatorPlayerClock"/>, stopping it from being managed by this <see cref="ISyncManager"/>.
/// </summary>
/// <param name="clock">The <see cref="ISpectatorPlayerClock"/> to remove.</param>
void RemoveManagedClock(ISpectatorPlayerClock clock);
}
}