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

@ -11,13 +11,23 @@ namespace osu.Game.Rulesets.Catch.Tests
[Ignore("getting CI working")]
public class TestCaseCatchStacker : Game.Tests.Visual.TestCasePlayer
{
public TestCaseCatchStacker() : base(typeof(CatchRuleset))
public TestCaseCatchStacker()
: base(typeof(CatchRuleset))
{
}
protected override Beatmap CreateBeatmap()
{
var beatmap = new Beatmap();
var beatmap = new Beatmap
{
BeatmapInfo = new BeatmapInfo
{
BaseDifficulty = new BeatmapDifficulty
{
CircleSize = 6,
}
}
};
for (int i = 0; i < 512; i++)
beatmap.HitObjects.Add(new Fruit { X = 0.5f + i / 2048f * (i % 10 - 5), StartTime = i * 100, NewCombo = i % 8 == 0 });

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);
}
}
}