Make hitobjects only have one judgement + result

This commit is contained in:
smoogipoo
2018-08-03 15:38:48 +09:00
parent 0da6c8c1a7
commit 2a4994e5ce
29 changed files with 66 additions and 110 deletions

View File

@ -99,7 +99,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
{
if (tail.AllJudged)
ApplyResult(Results.Single(), r => r.Type = HitResult.Perfect);
ApplyResult(r => r.Type = HitResult.Perfect);
}
protected override void Update()
@ -165,7 +165,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
return false;
// If the key has been released too early, the user should not receive full score for the release
if (Results.Single().Type == HitResult.Miss)
if (Result.Type == HitResult.Miss)
holdNote.hasBroken = true;
// The head note also handles early hits before the body, but we want accurate early hits to count as the body being held
@ -204,7 +204,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
if (!userTriggered)
{
if (!HitObject.HitWindows.CanBeHit(timeOffset))
ApplyResult(Results.Single(), r => r.Type = HitResult.Miss);
ApplyResult(r => r.Type = HitResult.Miss);
return;
}
@ -213,7 +213,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
if (result == HitResult.None)
return;
ApplyResult(Results.Single(), r =>
ApplyResult(r =>
{
if (holdNote.hasBroken && (result == HitResult.Perfect || result == HitResult.Perfect))
result = HitResult.Good;

View File

@ -2,7 +2,6 @@
// 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.Extensions.Color4Extensions;
@ -80,9 +79,9 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
var startTime = HoldStartTime?.Invoke();
if (startTime == null || startTime > HitObject.StartTime)
ApplyResult(Results.Single(), r => r.Type = HitResult.Miss);
ApplyResult(r => r.Type = HitResult.Miss);
else
ApplyResult(Results.Single(), r => r.Type = HitResult.Perfect);
ApplyResult(r => r.Type = HitResult.Perfect);
}
}
}

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using osu.Framework.Extensions.Color4Extensions;
using OpenTK.Graphics;
using osu.Framework.Graphics;
@ -61,7 +60,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
if (!userTriggered)
{
if (!HitObject.HitWindows.CanBeHit(timeOffset))
ApplyResult(Results.Single(), r => r.Type = HitResult.Miss);
ApplyResult(r => r.Type = HitResult.Miss);
return;
}
@ -69,7 +68,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
if (result == HitResult.None)
return;
ApplyResult(Results.Single(), r => r.Type = result);
ApplyResult(r => r.Type = result);
}
public virtual bool OnPressed(ManiaAction action)