mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 03:27:24 +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;
|
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)
|
public bool Seek(double position)
|
||||||
{
|
{
|
||||||
CurrentTime = position;
|
CurrentTime = position;
|
||||||
|
@ -144,6 +144,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
// Make sure the player clock is running if it can.
|
// Make sure the player clock is running if it can.
|
||||||
if (!clock.WaitingOnFrames.Value)
|
if (!clock.WaitingOnFrames.Value)
|
||||||
clock.Start();
|
clock.Start();
|
||||||
|
else
|
||||||
|
clock.Stop();
|
||||||
|
|
||||||
if (clock.IsCatchingUp)
|
if (clock.IsCatchingUp)
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ISpectatorPlayerClock : IFrameBasedClock, IAdjustableClock
|
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>
|
/// <summary>
|
||||||
/// Whether this clock is waiting on frames to continue playback.
|
/// Whether this clock is waiting on frames to continue playback.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user