Make Rulesets.Catch use the new judgement result structure

This commit is contained in:
smoogipoo
2018-08-02 20:37:07 +09:00
parent 807794d512
commit 9dff5cea07
12 changed files with 50 additions and 87 deletions

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Linq;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Graphics;
@ -56,10 +57,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
{
if (CheckPosition == null) return;
if (timeOffset >= 0 && HitObject is ICatchObjectWithJudgement judgeable)
{
ApplyJudgement(judgeable.Judgement, j => j.Result = CheckPosition.Invoke(HitObject) ? HitResult.Perfect : HitResult.Miss);
}
if (timeOffset >= 0 && Results.Count > 0)
ApplyResult(Results.Single(), r => r.Type = CheckPosition.Invoke(HitObject) ? HitResult.Perfect : HitResult.Miss);
}
protected override void SkinChanged(ISkinSource skin, bool allowFallback)