/// <summary> /// Creates a new <see cref="MultiSpectatorPlayer"/>. /// </summary> /// <param name="score">The score containing the player's replay.</param> /// <param name="spectatorPlayerClock">The clock controlling the gameplay running state.</param> public MultiSpectatorPlayer([NotNull] Score score, [NotNull] ISpectatorPlayerClock spectatorPlayerClock) : base(score, new PlayerConfiguration { AllowUserInteraction = false }) { this.spectatorPlayerClock = spectatorPlayerClock; }
private bool isCandidateAudioSource([CanBeNull] ISpectatorPlayerClock clock) => clock?.IsRunning == true && !clock.IsCatchingUp && !clock.WaitingOnFrames.Value;
public void RemovePlayerClock(ISpectatorPlayerClock clock) => playerClocks.Remove(clock);
public void AddPlayerClock(ISpectatorPlayerClock clock) { Debug.Assert(!playerClocks.Contains(clock)); playerClocks.Add(clock); }
public void AddPlayerClock(ISpectatorPlayerClock clock) => playerClocks.Add(clock);
/// <summary> /// Creates a new <see cref="MultiSpectatorPlayer"/>. /// </summary> /// <param name="score">The score containing the player's replay.</param> /// <param name="spectatorPlayerClock">The clock controlling the gameplay running state.</param> public MultiSpectatorPlayer([NotNull] Score score, [NotNull] ISpectatorPlayerClock spectatorPlayerClock) : base(score) { this.score = score; this.spectatorPlayerClock = spectatorPlayerClock; }
public void RemovePlayerClock(ISpectatorPlayerClock clock) { playerClocks.Remove(clock); clock.Stop(); }