mirror of https://github.com/ppy/osu
Make drawable bananas testable
This commit is contained in:
parent
3fe25fe67d
commit
bf25e81c94
|
@ -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
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue