1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:42:56 +08:00

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;
/// <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>
public event Action<DrawableHitObject, JudgementResult> OnResultReset;
public event Action<DrawableHitObject, JudgementResult> OnRevertResult;
/// <summary>
/// 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);

View File

@ -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
}
/// <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>
/// <param name="judgement">The judgement to remove.</param>
/// <param name="result">The judgement scoring result.</param>
private void resetResult(JudgementResult result)
private void revertResult(JudgementResult result)
{
ResetResult(result);
RevertResult(result);
updateScore();
}
@ -310,11 +311,11 @@ namespace osu.Game.Rulesets.Scoring
}
/// <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>
/// <param name="judgement">The judgement to remove.</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;
HighestCombo.Value = result.HighestComboAtJudgement;

View File

@ -183,14 +183,14 @@ namespace osu.Game.Rulesets.UI
where TObject : HitObject
{
/// <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>
public event Action<JudgementResult> OnNewResult;
/// <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>
public event Action<JudgementResult> OnResultReset;
public event Action<JudgementResult> OnRevertResult;
/// <summary>
/// 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);
}