mirror of
https://github.com/osukey/osukey.git
synced 2025-06-09 05:19:11 +09:00
Ignore non-scorable and bonus judgements
This commit is contained in:
parent
475788041a
commit
c8e14d7710
@ -109,6 +109,34 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
meter => meter.ChildrenOfType<ColourHitErrorMeter.HitErrorCircle>().Count() == 2));
|
meter => meter.ChildrenOfType<ColourHitErrorMeter.HitErrorCircle>().Count() == 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestBonus()
|
||||||
|
{
|
||||||
|
AddStep("OD 1", () => recreateDisplay(new OsuHitWindows(), 1));
|
||||||
|
|
||||||
|
AddStep("small bonus", () => newJudgement(result: HitResult.SmallBonus));
|
||||||
|
AddAssert("no bars added", () => !this.ChildrenOfType<BarHitErrorMeter.JudgementLine>().Any());
|
||||||
|
AddAssert("no circle added", () => !this.ChildrenOfType<ColourHitErrorMeter.HitErrorCircle>().Any());
|
||||||
|
|
||||||
|
AddStep("large bonus", () => newJudgement(result: HitResult.LargeBonus));
|
||||||
|
AddAssert("no bars added", () => !this.ChildrenOfType<BarHitErrorMeter.JudgementLine>().Any());
|
||||||
|
AddAssert("no circle added", () => !this.ChildrenOfType<ColourHitErrorMeter.HitErrorCircle>().Any());
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestIgnore()
|
||||||
|
{
|
||||||
|
AddStep("OD 1", () => recreateDisplay(new OsuHitWindows(), 1));
|
||||||
|
|
||||||
|
AddStep("ignore hit", () => newJudgement(result: HitResult.IgnoreHit));
|
||||||
|
AddAssert("no bars added", () => !this.ChildrenOfType<BarHitErrorMeter.JudgementLine>().Any());
|
||||||
|
AddAssert("no circle added", () => !this.ChildrenOfType<ColourHitErrorMeter.HitErrorCircle>().Any());
|
||||||
|
|
||||||
|
AddStep("ignore miss", () => newJudgement(result: HitResult.IgnoreMiss));
|
||||||
|
AddAssert("no bars added", () => !this.ChildrenOfType<BarHitErrorMeter.JudgementLine>().Any());
|
||||||
|
AddAssert("no circle added", () => !this.ChildrenOfType<ColourHitErrorMeter.HitErrorCircle>().Any());
|
||||||
|
}
|
||||||
|
|
||||||
private void recreateDisplay(HitWindows hitWindows, float overallDifficulty)
|
private void recreateDisplay(HitWindows hitWindows, float overallDifficulty)
|
||||||
{
|
{
|
||||||
hitWindows?.SetDifficulty(overallDifficulty);
|
hitWindows?.SetDifficulty(overallDifficulty);
|
||||||
|
@ -217,6 +217,9 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
if (!judgement.IsHit || judgement.HitObject.HitWindows?.WindowFor(HitResult.Miss) == 0)
|
if (!judgement.IsHit || judgement.HitObject.HitWindows?.WindowFor(HitResult.Miss) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!judgement.Type.IsScorable() || judgement.Type.IsBonus())
|
||||||
|
return;
|
||||||
|
|
||||||
if (judgementsContainer.Count > max_concurrent_judgements)
|
if (judgementsContainer.Count > max_concurrent_judgements)
|
||||||
{
|
{
|
||||||
const double quick_fade_time = 100;
|
const double quick_fade_time = 100;
|
||||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -24,7 +25,13 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
InternalChild = judgementsFlow = new JudgementFlow();
|
InternalChild = judgementsFlow = new JudgementFlow();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNewJudgement(JudgementResult judgement) => judgementsFlow.Push(GetColourForHitResult(judgement.Type));
|
protected override void OnNewJudgement(JudgementResult judgement)
|
||||||
|
{
|
||||||
|
if (!judgement.Type.IsScorable() || judgement.Type.IsBonus())
|
||||||
|
return;
|
||||||
|
|
||||||
|
judgementsFlow.Push(GetColourForHitResult(judgement.Type));
|
||||||
|
}
|
||||||
|
|
||||||
private class JudgementFlow : FillFlowContainer<HitErrorCircle>
|
private class JudgementFlow : FillFlowContainer<HitErrorCircle>
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user