mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 20:47:22 +08:00
Add test steps for droplet / tiny droplet
This commit is contained in:
parent
8a6a424893
commit
d275bc8a61
@ -38,9 +38,51 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
|
|
||||||
foreach (FruitVisualRepresentation rep in Enum.GetValues(typeof(FruitVisualRepresentation)))
|
foreach (FruitVisualRepresentation rep in Enum.GetValues(typeof(FruitVisualRepresentation)))
|
||||||
AddStep($"show {rep}", () => SetContents(() => createDrawable(rep)));
|
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)
|
Fruit fruit = new TestCatchFruit(rep)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user