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;
|
|
|
|
|
2021-05-03 12:38:53 +08:00
|
|
|
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
2021-04-15 18:32:55 +08:00
|
|
|
{
|
|
|
|
/// <summary>
|
2021-04-26 16:19:44 +08:00
|
|
|
/// Manages the synchronisation between one or more <see cref="ISpectatorPlayerClock"/>s in relation to a master clock.
|
2021-04-15 18:32:55 +08:00
|
|
|
/// </summary>
|
2021-04-16 21:47:52 +08:00
|
|
|
public interface ISyncManager
|
2021-04-15 18:32:55 +08:00
|
|
|
{
|
|
|
|
/// <summary>
|
2021-04-26 16:19:44 +08:00
|
|
|
/// The master clock which player clocks should synchronise to.
|
2021-04-15 18:32:55 +08:00
|
|
|
/// </summary>
|
2021-04-26 16:19:44 +08:00
|
|
|
IAdjustableClock MasterClock { get; }
|
2021-04-15 18:32:55 +08:00
|
|
|
|
|
|
|
/// <summary>
|
2021-04-26 16:19:44 +08:00
|
|
|
/// Adds an <see cref="ISpectatorPlayerClock"/> to manage.
|
2021-04-15 18:32:55 +08:00
|
|
|
/// </summary>
|
2021-04-26 16:19:44 +08:00
|
|
|
/// <param name="clock">The <see cref="ISpectatorPlayerClock"/> to add.</param>
|
|
|
|
void AddPlayerClock(ISpectatorPlayerClock clock);
|
2021-04-15 18:32:55 +08:00
|
|
|
|
|
|
|
/// <summary>
|
2021-04-26 16:19:44 +08:00
|
|
|
/// Removes an <see cref="ISpectatorPlayerClock"/>, stopping it from being managed by this <see cref="ISyncManager"/>.
|
2021-04-15 18:32:55 +08:00
|
|
|
/// </summary>
|
2021-04-26 16:19:44 +08:00
|
|
|
/// <param name="clock">The <see cref="ISpectatorPlayerClock"/> to remove.</param>
|
|
|
|
void RemovePlayerClock(ISpectatorPlayerClock clock);
|
2021-04-15 18:32:55 +08:00
|
|
|
}
|
|
|
|
}
|