Add catcher scale based on CircleSize

This commit is contained in:
Dean Herbert
2017-11-28 19:43:26 +09:00
parent b11de50df2
commit 2bb61e51ac
3 changed files with 39 additions and 17 deletions

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Tests.Visual;
@ -15,26 +16,35 @@ namespace osu.Game.Rulesets.Catch.Tests
[Ignore("getting CI working")]
internal class TestCaseCatcherArea : OsuTestCase
{
private RulesetInfo catchRuleset;
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(CatcherArea),
};
[BackgroundDependencyLoader]
private void load(RulesetStore rulesets)
public TestCaseCatcherArea()
{
Children = new Drawable[]
AddSliderStep<float>("CircleSize", 0, 8, 5, craeteCatcher);
}
private void craeteCatcher(float size)
{
Child = new CatchInputManager(catchRuleset)
{
new CatchInputManager(rulesets.GetRuleset(2))
RelativeSizeAxes = Axes.Both,
Child = new CatcherArea(new BeatmapDifficulty { CircleSize = size })
{
RelativeSizeAxes = Axes.Both,
Child = new CatcherArea()
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft
}
Anchor = Anchor.CentreLeft,
Origin = Anchor.BottomLeft
},
};
}
[BackgroundDependencyLoader]
private void load(RulesetStore rulesets)
{
catchRuleset = rulesets.GetRuleset(2);
}
}
}