mirror of
https://github.com/ppy/osu
synced 2025-02-23 05:57:20 +00:00
Rename more judgement-related methods to "result"
This commit is contained in:
parent
ab642b563f
commit
741ec0021e
@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
|
||||
public Func<CatchHitObject, bool> CheckPosition;
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (CheckPosition == null) return;
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
/// </summary>
|
||||
public class DrawableHoldNote : DrawableManiaHitObject<HoldNote>, IKeyBindingHandler<ManiaAction>
|
||||
{
|
||||
public override bool DisplayJudgement => false;
|
||||
public override bool DisplayResult => false;
|
||||
|
||||
private readonly DrawableNote head;
|
||||
private readonly DrawableNote tail;
|
||||
@ -96,7 +96,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (tail.AllJudged)
|
||||
ApplyResult(r => r.Type = HitResult.Perfect);
|
||||
@ -196,7 +196,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
this.holdNote = holdNote;
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
// Factor in the release lenience
|
||||
timeOffset /= release_window_lenience;
|
||||
@ -233,7 +233,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
if (action != Action.Value)
|
||||
return false;
|
||||
|
||||
UpdateJudgement(true);
|
||||
UpdateResult(true);
|
||||
|
||||
// Handled by the hold note, which will set holding = false
|
||||
return false;
|
||||
|
@ -71,7 +71,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (Time.Current < HitObject.StartTime)
|
||||
return;
|
||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!userTriggered)
|
||||
{
|
||||
@ -76,7 +76,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
if (action != Action.Value)
|
||||
return false;
|
||||
|
||||
return UpdateJudgement(true);
|
||||
return UpdateResult(true);
|
||||
}
|
||||
|
||||
public virtual bool OnReleased(ManiaAction action) => false;
|
||||
|
@ -138,7 +138,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
|
||||
internal void OnNewResult(DrawableHitObject judgedObject, JudgementResult result)
|
||||
{
|
||||
if (!result.IsHit || !judgedObject.DisplayJudgement || !DisplayJudgements)
|
||||
if (!result.IsHit || !judgedObject.DisplayResult || !DisplayJudgements)
|
||||
return;
|
||||
|
||||
explosionContainer.Add(new HitExplosion(judgedObject)
|
||||
|
@ -163,7 +163,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
|
||||
internal void OnNewResult(DrawableHitObject judgedObject, JudgementResult result)
|
||||
{
|
||||
if (!judgedObject.DisplayJudgement || !DisplayJudgements)
|
||||
if (!judgedObject.DisplayResult || !DisplayJudgements)
|
||||
return;
|
||||
|
||||
judgements.Clear();
|
||||
|
@ -94,7 +94,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
this.auto = auto;
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (auto && !userTriggered && timeOffset > 0)
|
||||
{
|
||||
@ -102,7 +102,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
ApplyResult(r => r.Type = HitResult.Great);
|
||||
}
|
||||
else
|
||||
base.CheckForJudgements(userTriggered, timeOffset);
|
||||
base.CheckForResult(userTriggered, timeOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
this.auto = auto;
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (auto && !userTriggered && Time.Current > Spinner.StartTime + Spinner.Duration / 2 && Progress < 1)
|
||||
{
|
||||
@ -81,7 +81,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
auto = false;
|
||||
}
|
||||
|
||||
base.CheckForJudgements(userTriggered, timeOffset);
|
||||
base.CheckForResult(userTriggered, timeOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
if (AllJudged)
|
||||
return false;
|
||||
|
||||
UpdateJudgement(true);
|
||||
UpdateResult(true);
|
||||
return true;
|
||||
},
|
||||
},
|
||||
@ -76,7 +76,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!userTriggered)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
};
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (repeatPoint.StartTime <= Time.Current)
|
||||
ApplyResult(r => r.Type = drawableSlider.Tracking ? HitResult.Great : HitResult.Miss);
|
||||
|
@ -131,7 +131,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (userTriggered || Time.Current < slider.EndTime)
|
||||
return;
|
||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
/// <summary>
|
||||
/// The judgement text is provided by the <see cref="DrawableSlider"/>.
|
||||
/// </summary>
|
||||
public override bool DisplayJudgement => false;
|
||||
public override bool DisplayResult => false;
|
||||
|
||||
public bool Tracking { get; set; }
|
||||
|
||||
@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
Position = HitObject.Position - slider.Position;
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!userTriggered && timeOffset >= 0)
|
||||
ApplyResult(r => r.Type = Tracking ? HitResult.Great : HitResult.Miss);
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
|
||||
public bool Tracking { get; set; }
|
||||
|
||||
public override bool DisplayJudgement => false;
|
||||
public override bool DisplayResult => false;
|
||||
|
||||
public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick)
|
||||
{
|
||||
@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
};
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (timeOffset >= 0)
|
||||
ApplyResult(r => r.Type = Tracking ? HitResult.Great : HitResult.Miss);
|
||||
|
@ -116,7 +116,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
|
||||
public float Progress => MathHelper.Clamp(Disc.RotationAbsolute / 360 / Spinner.SpinsRequired, 0, 1);
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (Time.Current < HitObject.StartTime) return;
|
||||
|
||||
|
@ -66,7 +66,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
|
||||
private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)
|
||||
{
|
||||
if (!judgedObject.DisplayJudgement || !DisplayJudgements)
|
||||
if (!judgedObject.DisplayResult || !DisplayJudgements)
|
||||
return;
|
||||
|
||||
DrawableOsuJudgement explosion = new DrawableOsuJudgement(result, judgedObject)
|
||||
|
@ -73,7 +73,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
MainPiece.FadeAccent(newColour, 100);
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (userTriggered)
|
||||
return;
|
||||
@ -108,7 +108,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!MainObject.Judged)
|
||||
return;
|
||||
|
@ -17,14 +17,14 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
FillMode = FillMode.Fit;
|
||||
}
|
||||
|
||||
public override bool DisplayJudgement => false;
|
||||
public override bool DisplayResult => false;
|
||||
|
||||
protected override TaikoPiece CreateMainPiece() => new TickPiece
|
||||
{
|
||||
Filled = HitObject.FirstTick
|
||||
};
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!userTriggered)
|
||||
{
|
||||
@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnPressed(TaikoAction action) => UpdateJudgement(true);
|
||||
public override bool OnPressed(TaikoAction action) => UpdateResult(true);
|
||||
|
||||
protected override DrawableStrongHandler CreateStrongHandler(StrongHitObject hitObject) => new StrongHandler(hitObject, this);
|
||||
|
||||
@ -60,7 +60,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!MainObject.Judged)
|
||||
return;
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
FillMode = FillMode.Fit;
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!userTriggered)
|
||||
{
|
||||
@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
validActionPressed = HitActions.Contains(action);
|
||||
|
||||
// Only count this as handled if the new judgement is a hit
|
||||
var result = UpdateJudgement(true);
|
||||
var result = UpdateResult(true);
|
||||
|
||||
if (IsHit)
|
||||
HitAction = action;
|
||||
@ -144,11 +144,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!MainObject.Result.HasResult)
|
||||
{
|
||||
base.CheckForJudgements(userTriggered, timeOffset);
|
||||
base.CheckForResult(userTriggered, timeOffset);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
if (!MainObject.HitActions.Contains(action))
|
||||
return false;
|
||||
|
||||
return UpdateJudgement(true);
|
||||
return UpdateResult(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
/// </summary>
|
||||
public abstract class DrawableStrongHandler : DrawableTaikoHitObject
|
||||
{
|
||||
public override bool DisplayJudgement => false;
|
||||
public override bool DisplayResult => false;
|
||||
|
||||
public readonly DrawableHitObject MainObject;
|
||||
|
||||
|
@ -131,7 +131,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
Width *= Parent.RelativeChildSize.X;
|
||||
}
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (userTriggered)
|
||||
{
|
||||
@ -231,7 +231,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
return false;
|
||||
lastWasCentre = isCentre;
|
||||
|
||||
UpdateJudgement(true);
|
||||
UpdateResult(true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
public class DrawableSwellTick : DrawableTaikoHitObject
|
||||
{
|
||||
public override bool DisplayJudgement => false;
|
||||
public override bool DisplayResult => false;
|
||||
|
||||
public DrawableSwellTick(TaikoHitObject hitObject)
|
||||
: base(hitObject)
|
||||
@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
|
||||
public void TriggerResult(HitResult type) => ApplyResult(r => r.Type = type);
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
if (!DisplayJudgements)
|
||||
return;
|
||||
|
||||
if (!judgedObject.DisplayJudgement)
|
||||
if (!judgedObject.DisplayResult)
|
||||
return;
|
||||
|
||||
switch (result.Judgement)
|
||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
/// <summary>
|
||||
/// Whether a visible judgement should be displayed when this representation is hit.
|
||||
/// </summary>
|
||||
public virtual bool DisplayJudgement => true;
|
||||
public virtual bool DisplayResult => true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this <see cref="DrawableHitObject"/> and all of its nested <see cref="DrawableHitObject"/>s have been judged.
|
||||
@ -173,7 +173,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
{
|
||||
base.UpdateAfterChildren();
|
||||
|
||||
UpdateJudgement(false);
|
||||
UpdateResult(false);
|
||||
}
|
||||
|
||||
protected virtual void AddNested(DrawableHitObject h)
|
||||
@ -223,7 +223,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
/// </summary>
|
||||
/// <param name="userTriggered">Whether the user triggered this process.</param>
|
||||
/// <returns>Whether a judgement has occurred from this <see cref="DrawableHitObject"/> or any nested <see cref="DrawableHitObject"/>s.</returns>
|
||||
protected bool UpdateJudgement(bool userTriggered)
|
||||
protected bool UpdateResult(bool userTriggered)
|
||||
{
|
||||
judgementOccurred = false;
|
||||
|
||||
@ -231,13 +231,13 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
return false;
|
||||
|
||||
foreach (var d in NestedHitObjects)
|
||||
judgementOccurred |= d.UpdateJudgement(userTriggered);
|
||||
judgementOccurred |= d.UpdateResult(userTriggered);
|
||||
|
||||
if (judgementOccurred || Judged)
|
||||
return judgementOccurred;
|
||||
|
||||
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||
CheckForJudgements(userTriggered, Time.Current - endTime);
|
||||
CheckForResult(userTriggered, Time.Current - endTime);
|
||||
|
||||
return judgementOccurred;
|
||||
}
|
||||
@ -249,7 +249,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
/// <param name="userTriggered">Whether the user triggered this check.</param>
|
||||
/// <param name="timeOffset">The offset from the <see cref="HitObject"/> end time at which this check occurred. A <paramref name="timeOffset"/> > 0
|
||||
/// implies that this check occurred after the end time of <see cref="HitObject"/>. </param>
|
||||
protected virtual void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
protected virtual void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user