Pass a score to the replay recorder to allow reading more general scoring data

This commit is contained in:
Dean Herbert
2020-12-14 16:52:14 +09:00
parent 51e8a05f18
commit 1793385e96
14 changed files with 41 additions and 34 deletions

View File

@ -268,12 +268,12 @@ namespace osu.Game.Rulesets.UI
return false;
}
public sealed override void SetRecordTarget(Replay recordingReplay)
public sealed override void SetRecordTarget(Score score)
{
if (!(KeyBindingInputManager is IHasRecordingHandler recordingInputManager))
throw new InvalidOperationException($"A {nameof(KeyBindingInputManager)} which supports recording is not available");
var recorder = CreateReplayRecorder(recordingReplay);
var recorder = CreateReplayRecorder(score);
if (recorder == null)
return;
@ -327,7 +327,7 @@ namespace osu.Game.Rulesets.UI
protected virtual ReplayInputHandler CreateReplayInputHandler(Replay replay) => null;
protected virtual ReplayRecorder CreateReplayRecorder(Replay replay) => null;
protected virtual ReplayRecorder CreateReplayRecorder(Score score) => null;
/// <summary>
/// Creates a Playfield.
@ -516,8 +516,8 @@ namespace osu.Game.Rulesets.UI
/// <summary>
/// Sets a replay to be used to record gameplay.
/// </summary>
/// <param name="recordingReplay">The target to be recorded to.</param>
public abstract void SetRecordTarget(Replay recordingReplay);
/// <param name="score">The target to be recorded to.</param>
public abstract void SetRecordTarget(Score score);
/// <summary>
/// Invoked when the interactive user requests resuming from a paused state.