Expose full hitobject rather than hit windows

This commit is contained in:
smoogipoo
2019-09-02 17:14:40 +09:00
parent f2bdf94a1d
commit 0c73c5acf3
10 changed files with 25 additions and 28 deletions

View File

@ -99,7 +99,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
if (judgement != null)
{
Result = CreateResult(judgement, HitObject.HitWindows);
Result = CreateResult(judgement);
if (Result == null)
throw new InvalidOperationException($"{GetType().ReadableName()} must provide a {nameof(JudgementResult)} through {nameof(CreateResult)}.");
}
@ -401,9 +401,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// Creates the <see cref="JudgementResult"/> that represents the scoring result for this <see cref="DrawableHitObject"/>.
/// </summary>
/// <param name="judgement">The <see cref="Judgement"/> that provides the scoring information.</param>
/// <param name="hitWindows">The <see cref="HitWindows"/> which the <see cref="HitObject"/> was judged against.
/// May be null to indicate that the timing error should not be displayed to the user.</param>
protected virtual JudgementResult CreateResult(Judgement judgement, HitWindows hitWindows) => new JudgementResult(judgement, hitWindows);
protected virtual JudgementResult CreateResult(Judgement judgement) => new JudgementResult(HitObject, judgement);
}
public abstract class DrawableHitObject<TObject> : DrawableHitObject