Ejemplo n.º 1
0
 /// <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;
 }
Ejemplo n.º 2
0
 private bool isCandidateAudioSource([CanBeNull] ISpectatorPlayerClock clock)
 => clock?.IsRunning == true && !clock.IsCatchingUp && !clock.WaitingOnFrames.Value;
Ejemplo n.º 3
0
 public void RemovePlayerClock(ISpectatorPlayerClock clock) => playerClocks.Remove(clock);
Ejemplo n.º 4
0
 public void AddPlayerClock(ISpectatorPlayerClock clock)
 {
     Debug.Assert(!playerClocks.Contains(clock));
     playerClocks.Add(clock);
 }
Ejemplo n.º 5
0
 public void AddPlayerClock(ISpectatorPlayerClock clock) => playerClocks.Add(clock);
Ejemplo n.º 6
0
 /// <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;
 }
Ejemplo n.º 7
0
 public void RemovePlayerClock(ISpectatorPlayerClock clock)
 {
     playerClocks.Remove(clock);
     clock.Stop();
 }