Make drawable bananas testable

This commit is contained in:
Dean Herbert 2018-05-25 17:32:22 +09:00
parent 3fe25fe67d
commit bf25e81c94
2 changed files with 15 additions and 7 deletions

View File

@ -37,7 +37,7 @@ private void createCatcher(float size)
Child = catcherArea = new TestCatcherArea(new BeatmapDifficulty { CircleSize = size })
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.BottomLeft
Origin = Anchor.TopLeft
},
};
}

View File

@ -25,6 +25,7 @@ public class TestCaseFruitObjects : OsuTestCase
typeof(DrawableCatchHitObject),
typeof(DrawableFruit),
typeof(DrawableDroplet),
typeof(BananaShower),
typeof(Pulp),
};
@ -53,12 +54,19 @@ public TestCaseFruitObjects()
private DrawableFruit createDrawable(int index)
{
var fruit = new Fruit
{
StartTime = 1000000000000,
IndexInBeatmap = index,
Scale = 1.5f,
};
Fruit fruit = index == 5
? new BananaShower.Banana
{
StartTime = 1000000000000,
IndexInBeatmap = index,
Scale = 1.5f,
}
: new Fruit
{
StartTime = 1000000000000,
IndexInBeatmap = index,
Scale = 1.5f,
};
return new DrawableFruit(fruit)
{