2021-04-15 18:32:55 +08:00
|
|
|
// 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 osu.Framework.Timing;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate.Sync
|
|
|
|
{
|
|
|
|
/// <summary>
|
2021-04-15 18:35:57 +08:00
|
|
|
/// Manages the synchronisation between one or more <see cref="ISpectatorSlaveClock"/>s in relation to a master clock.
|
2021-04-15 18:32:55 +08:00
|
|
|
/// </summary>
|
|
|
|
public interface ISpectatorSyncManager
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// The master clock which slaves should synchronise to.
|
|
|
|
/// </summary>
|
|
|
|
IAdjustableClock Master { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
2021-04-15 18:35:57 +08:00
|
|
|
/// Adds an <see cref="ISpectatorSlaveClock"/> to manage.
|
2021-04-15 18:32:55 +08:00
|
|
|
/// </summary>
|
2021-04-15 18:35:57 +08:00
|
|
|
/// <param name="clock">The <see cref="ISpectatorSlaveClock"/> to add.</param>
|
2021-04-15 18:32:55 +08:00
|
|
|
void AddSlave(ISpectatorSlaveClock clock);
|
|
|
|
|
|
|
|
/// <summary>
|
2021-04-15 18:35:57 +08:00
|
|
|
/// Removes an <see cref="ISpectatorSlaveClock"/>, stopping it from being managed by this <see cref="ISpectatorSyncManager"/>.
|
2021-04-15 18:32:55 +08:00
|
|
|
/// </summary>
|
2021-04-15 18:35:57 +08:00
|
|
|
/// <param name="clock">The <see cref="ISpectatorSlaveClock"/> to remove.</param>
|
2021-04-15 18:32:55 +08:00
|
|
|
void RemoveSlave(ISpectatorSlaveClock clock);
|
|
|
|
}
|
|
|
|
}
|