mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
Make catch-up spectator clocks running state immutable externally
This commit is contained in:
parent
d73afcaf48
commit
27da293b40
@ -34,6 +34,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
|
||||
public void Stop() => IsRunning = false;
|
||||
|
||||
void IAdjustableClock.Start()
|
||||
{
|
||||
// Our running state should only be managed by an ISyncManager, ignore calls from external sources.
|
||||
}
|
||||
|
||||
void IAdjustableClock.Stop()
|
||||
{
|
||||
// Our running state should only be managed by an ISyncManager, ignore calls from external sources.
|
||||
}
|
||||
|
||||
public bool Seek(double position)
|
||||
{
|
||||
CurrentTime = position;
|
||||
|
@ -144,6 +144,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
// Make sure the player clock is running if it can.
|
||||
if (!clock.WaitingOnFrames.Value)
|
||||
clock.Start();
|
||||
else
|
||||
clock.Stop();
|
||||
|
||||
if (clock.IsCatchingUp)
|
||||
{
|
||||
|
@ -11,6 +11,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
/// </summary>
|
||||
public interface ISpectatorPlayerClock : IFrameBasedClock, IAdjustableClock
|
||||
{
|
||||
/// <summary>
|
||||
/// Starts this <see cref="ISpectatorPlayerClock"/>.
|
||||
/// </summary>
|
||||
new void Start();
|
||||
|
||||
/// <summary>
|
||||
/// Stops this <see cref="ISpectatorPlayerClock"/>.
|
||||
/// </summary>
|
||||
new void Stop();
|
||||
|
||||
/// <summary>
|
||||
/// Whether this clock is waiting on frames to continue playback.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user