1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

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 @@ namespace osu.Game.Rulesets.Catch.Tests
Child = catcherArea = new TestCatcherArea(new BeatmapDifficulty { CircleSize = size }) Child = catcherArea = new TestCatcherArea(new BeatmapDifficulty { CircleSize = size })
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.BottomLeft Origin = Anchor.TopLeft
}, },
}; };
} }

View File

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