Add test steps for droplet / tiny droplet

This commit is contained in:
Dean Herbert 2020-02-21 10:44:48 +09:00
parent 8a6a424893
commit d275bc8a61
1 changed files with 43 additions and 1 deletions

View File

@ -38,9 +38,51 @@ protected override void LoadComplete()
foreach (FruitVisualRepresentation rep in Enum.GetValues(typeof(FruitVisualRepresentation)))
AddStep($"show {rep}", () => SetContents(() => createDrawable(rep)));
AddStep("show droplet", () => SetContents(createDrawableDroplet));
AddStep("show tiny droplet", () => SetContents(createDrawableTinyDroplet));
}
private DrawableFruit createDrawable(FruitVisualRepresentation rep)
private Drawable createDrawableTinyDroplet()
{
var droplet = new TinyDroplet
{
StartTime = Clock.CurrentTime,
Scale = 1.5f,
};
return new DrawableTinyDroplet(droplet)
{
Anchor = Anchor.Centre,
RelativePositionAxes = Axes.None,
Position = Vector2.Zero,
Alpha = 1,
LifetimeStart = double.NegativeInfinity,
LifetimeEnd = double.PositiveInfinity,
};
}
private Drawable createDrawableDroplet()
{
var droplet = new Droplet
{
StartTime = Clock.CurrentTime,
Scale = 1.5f,
};
return new DrawableDroplet(droplet)
{
Anchor = Anchor.Centre,
RelativePositionAxes = Axes.None,
Position = Vector2.Zero,
Alpha = 1,
LifetimeStart = double.NegativeInfinity,
LifetimeEnd = double.PositiveInfinity,
};
}
private Drawable createDrawable(FruitVisualRepresentation rep)
{
Fruit fruit = new TestCatchFruit(rep)
{