Add testing support for hyperdash fruits

This commit is contained in:
Dean Herbert 2020-02-26 19:22:09 +09:00
parent 015a39abc7
commit 83495eb648
1 changed files with 9 additions and 2 deletions

View File

@ -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)
{