From 83495eb64804e1089cb8712a992f20e64996d1de Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 26 Feb 2020 19:22:09 +0900 Subject: [PATCH] Add testing support for hyperdash fruits --- .../TestSceneFruitObjects.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs index 7bade41e6c..82d5aa936f 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs @@ -42,6 +42,9 @@ protected override void LoadComplete() AddStep("show droplet", () => SetContents(createDrawableDroplet)); AddStep("show tiny droplet", () => SetContents(createDrawableTinyDroplet)); + + foreach (FruitVisualRepresentation rep in Enum.GetValues(typeof(FruitVisualRepresentation))) + AddStep($"show hyperdash {rep}", () => SetContents(() => createDrawable(rep, true))); } private Drawable createDrawableTinyDroplet() @@ -82,9 +85,13 @@ private Drawable createDrawableDroplet() }; } - private Drawable createDrawable(FruitVisualRepresentation rep) + private Drawable createDrawable(FruitVisualRepresentation rep, bool hyperdash = false) { - Fruit fruit = new TestCatchFruit(rep) { Scale = 1.5f }; + Fruit fruit = new TestCatchFruit(rep) + { + Scale = 1.5f, + HyperDashTarget = hyperdash ? new Banana() : null + }; return new DrawableFruit(fruit) {