ResetResult -> RevertResult

This commit is contained in:
smoogipoo 2018-08-06 12:29:22 +09:00
parent c48a4d9993
commit 2a54b5b78d
3 changed files with 15 additions and 14 deletions

View File

@ -42,9 +42,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
public event Action<DrawableHitObject, JudgementResult> OnNewResult; public event Action<DrawableHitObject, JudgementResult> OnNewResult;
/// <summary> /// <summary>
/// Invoked when a <see cref="JudgementResult"/> has been reset by this <see cref="DrawableHitObject"/> or a nested <see cref="DrawableHitObject"/>. /// Invoked when a <see cref="JudgementResult"/> is being reverted by this <see cref="DrawableHitObject"/> or a nested <see cref="DrawableHitObject"/>.
/// </summary> /// </summary>
public event Action<DrawableHitObject, JudgementResult> OnResultReset; public event Action<DrawableHitObject, JudgementResult> OnRevertResult;
/// <summary> /// <summary>
/// Whether a visual indicator should be displayed when a scoring result occurs. /// Whether a visual indicator should be displayed when a scoring result occurs.
@ -159,7 +159,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
if (Result.TimeOffset + endTime < Time.Current) if (Result.TimeOffset + endTime < Time.Current)
{ {
OnResultReset?.Invoke(this, Result); OnRevertResult?.Invoke(this, Result);
Result.Type = HitResult.None; Result.Type = HitResult.None;
State.Value = ArmedState.Idle; State.Value = ArmedState.Idle;
@ -179,7 +179,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
protected virtual void AddNested(DrawableHitObject h) protected virtual void AddNested(DrawableHitObject h)
{ {
h.OnNewResult += (d, r) => OnNewResult?.Invoke(d, r); h.OnNewResult += (d, r) => OnNewResult?.Invoke(d, r);
h.OnResultReset += (d, r) => OnResultReset?.Invoke(d, r); h.OnRevertResult += (d, r) => OnRevertResult?.Invoke(d, r);
h.ApplyCustomUpdateState += (d, j) => ApplyCustomUpdateState?.Invoke(d, j); h.ApplyCustomUpdateState += (d, j) => ApplyCustomUpdateState?.Invoke(d, j);
nestedHitObjects.Value.Add(h); nestedHitObjects.Value.Add(h);

View File

@ -4,6 +4,7 @@
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Extensions.TypeExtensions;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects;
@ -196,7 +197,7 @@ namespace osu.Game.Rulesets.Scoring
Debug.Assert(base_portion + combo_portion == 1.0); Debug.Assert(base_portion + combo_portion == 1.0);
rulesetContainer.OnNewResult += applyResult; rulesetContainer.OnNewResult += applyResult;
rulesetContainer.OnResultReset += resetResult; rulesetContainer.OnRevertResult += revertResult;
SimulateAutoplay(rulesetContainer.Beatmap); SimulateAutoplay(rulesetContainer.Beatmap);
Reset(true); Reset(true);
@ -261,13 +262,13 @@ namespace osu.Game.Rulesets.Scoring
} }
/// <summary> /// <summary>
/// Resets the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/>. /// Reverts the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/>.
/// </summary> /// </summary>
/// <param name="judgement">The judgement to remove.</param> /// <param name="judgement">The judgement to remove.</param>
/// <param name="result">The judgement scoring result.</param> /// <param name="result">The judgement scoring result.</param>
private void resetResult(JudgementResult result) private void revertResult(JudgementResult result)
{ {
ResetResult(result); RevertResult(result);
updateScore(); updateScore();
} }
@ -310,11 +311,11 @@ namespace osu.Game.Rulesets.Scoring
} }
/// <summary> /// <summary>
/// Resets the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/>. /// Reverts the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/>.
/// </summary> /// </summary>
/// <param name="judgement">The judgement to remove.</param> /// <param name="judgement">The judgement to remove.</param>
/// <param name="result">The judgement scoring result.</param> /// <param name="result">The judgement scoring result.</param>
protected virtual void ResetResult(JudgementResult result) protected virtual void RevertResult(JudgementResult result)
{ {
Combo.Value = result.ComboAtJudgement; Combo.Value = result.ComboAtJudgement;
HighestCombo.Value = result.HighestComboAtJudgement; HighestCombo.Value = result.HighestComboAtJudgement;

View File

@ -183,14 +183,14 @@ namespace osu.Game.Rulesets.UI
where TObject : HitObject where TObject : HitObject
{ {
/// <summary> /// <summary>
/// Invoked when a <see cref="JudgementResult"/> has been applied by any <see cref="DrawableHitObject"/>. /// Invoked when a <see cref="JudgementResult"/> has been applied by a <see cref="DrawableHitObject"/>.
/// </summary> /// </summary>
public event Action<JudgementResult> OnNewResult; public event Action<JudgementResult> OnNewResult;
/// <summary> /// <summary>
/// Invoked when a <see cref="JudgementResult"/> has been reset by any <see cref="DrawableHitObject"/>. /// Invoked when a <see cref="JudgementResult"/> is being reverted by a <see cref="DrawableHitObject"/>.
/// </summary> /// </summary>
public event Action<JudgementResult> OnResultReset; public event Action<JudgementResult> OnRevertResult;
/// <summary> /// <summary>
/// The Beatmap /// The Beatmap
@ -298,7 +298,7 @@ namespace osu.Game.Rulesets.UI
continue; continue;
drawableObject.OnNewResult += (_, r) => OnNewResult?.Invoke(r); drawableObject.OnNewResult += (_, r) => OnNewResult?.Invoke(r);
drawableObject.OnResultReset += (_, r) => OnResultReset?.Invoke(r); drawableObject.OnRevertResult += (_, r) => OnRevertResult?.Invoke(r);
Playfield.Add(drawableObject); Playfield.Add(drawableObject);
} }