Merge pull request #13381 from smoogipoo/improve-hit-error-judgements

Improve hit error judgement displays
This commit is contained in:
Dean Herbert
2021-06-09 19:40:17 +09:00
committed by GitHub
4 changed files with 43 additions and 1 deletions

View File

@ -109,6 +109,34 @@ namespace osu.Game.Tests.Visual.Gameplay
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)
{
hitWindows?.SetDifficulty(overallDifficulty);