From 2a54b5b78d06859816fffed21511fee2b9657bdc Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 6 Aug 2018 12:29:22 +0900 Subject: [PATCH] ResetResult -> RevertResult --- .../Rulesets/Objects/Drawables/DrawableHitObject.cs | 8 ++++---- osu.Game/Rulesets/Scoring/ScoreProcessor.cs | 13 +++++++------ osu.Game/Rulesets/UI/RulesetContainer.cs | 8 ++++---- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs index e1848412c2..2abb2eb289 100644 --- a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs @@ -42,9 +42,9 @@ namespace osu.Game.Rulesets.Objects.Drawables public event Action OnNewResult; /// - /// Invoked when a has been reset by this or a nested . + /// Invoked when a is being reverted by this or a nested . /// - public event Action OnResultReset; + public event Action OnRevertResult; /// /// 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) { - OnResultReset?.Invoke(this, Result); + OnRevertResult?.Invoke(this, Result); Result.Type = HitResult.None; State.Value = ArmedState.Idle; @@ -179,7 +179,7 @@ namespace osu.Game.Rulesets.Objects.Drawables protected virtual void AddNested(DrawableHitObject h) { 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); nestedHitObjects.Value.Add(h); diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index 1f0584405a..d8c72d4b2e 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -4,6 +4,7 @@ using System; using System.Diagnostics; using osu.Framework.Configuration; +using osu.Framework.Extensions.TypeExtensions; using osu.Game.Beatmaps; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Objects; @@ -196,7 +197,7 @@ namespace osu.Game.Rulesets.Scoring Debug.Assert(base_portion + combo_portion == 1.0); rulesetContainer.OnNewResult += applyResult; - rulesetContainer.OnResultReset += resetResult; + rulesetContainer.OnRevertResult += revertResult; SimulateAutoplay(rulesetContainer.Beatmap); Reset(true); @@ -261,13 +262,13 @@ namespace osu.Game.Rulesets.Scoring } /// - /// Resets the score change of a that was applied to this . + /// Reverts the score change of a that was applied to this . /// /// The judgement to remove. /// The judgement scoring result. - private void resetResult(JudgementResult result) + private void revertResult(JudgementResult result) { - ResetResult(result); + RevertResult(result); updateScore(); } @@ -310,11 +311,11 @@ namespace osu.Game.Rulesets.Scoring } /// - /// Resets the score change of a that was applied to this . + /// Reverts the score change of a that was applied to this . /// /// The judgement to remove. /// The judgement scoring result. - protected virtual void ResetResult(JudgementResult result) + protected virtual void RevertResult(JudgementResult result) { Combo.Value = result.ComboAtJudgement; HighestCombo.Value = result.HighestComboAtJudgement; diff --git a/osu.Game/Rulesets/UI/RulesetContainer.cs b/osu.Game/Rulesets/UI/RulesetContainer.cs index 23ec0575e3..64ee680d45 100644 --- a/osu.Game/Rulesets/UI/RulesetContainer.cs +++ b/osu.Game/Rulesets/UI/RulesetContainer.cs @@ -183,14 +183,14 @@ namespace osu.Game.Rulesets.UI where TObject : HitObject { /// - /// Invoked when a has been applied by any . + /// Invoked when a has been applied by a . /// public event Action OnNewResult; /// - /// Invoked when a has been reset by any . + /// Invoked when a is being reverted by a . /// - public event Action OnResultReset; + public event Action OnRevertResult; /// /// The Beatmap @@ -298,7 +298,7 @@ namespace osu.Game.Rulesets.UI continue; drawableObject.OnNewResult += (_, r) => OnNewResult?.Invoke(r); - drawableObject.OnResultReset += (_, r) => OnResultReset?.Invoke(r); + drawableObject.OnRevertResult += (_, r) => OnRevertResult?.Invoke(r); Playfield.Add(drawableObject); }