mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 15:43:18 +08:00
1. fix TestCaseManiaHitObjects broken
2. add (4+4) (2+4+2) (1+8+1) column stages step in TestCaseManiaPlayfield
This commit is contained in:
parent
a855a21ccb
commit
aadafae8cb
@ -78,7 +78,7 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
RelativeChildSize = new Vector2(1, 10000),
|
RelativeChildSize = new Vector2(1, 10000),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new DrawableHoldNote(new HoldNote(), ManiaAction.Key1)
|
new DrawableHoldNote(new HoldNote(){Duration = 1000}, ManiaAction.Key1)
|
||||||
{
|
{
|
||||||
Y = 5000,
|
Y = 5000,
|
||||||
Height = 1000,
|
Height = 1000,
|
||||||
|
@ -41,6 +41,36 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
AddStep("Right special style", () => createPlayfield(4, SpecialColumnPosition.Right));
|
AddStep("Right special style", () => createPlayfield(4, SpecialColumnPosition.Right));
|
||||||
AddStep("5 columns", () => createPlayfield(5, SpecialColumnPosition.Normal));
|
AddStep("5 columns", () => createPlayfield(5, SpecialColumnPosition.Normal));
|
||||||
AddStep("8 columns", () => createPlayfield(8, SpecialColumnPosition.Normal));
|
AddStep("8 columns", () => createPlayfield(8, SpecialColumnPosition.Normal));
|
||||||
|
AddStep("4 + 4 columns", () =>
|
||||||
|
{
|
||||||
|
var stages = new List<StageDefinition>()
|
||||||
|
{
|
||||||
|
new StageDefinition() { Columns = 4 },
|
||||||
|
new StageDefinition() { Columns = 4 },
|
||||||
|
};
|
||||||
|
createPlayfield(stages, SpecialColumnPosition.Normal);
|
||||||
|
});
|
||||||
|
AddStep("2 + 4 + 2 columns", () =>
|
||||||
|
{
|
||||||
|
var stages = new List<StageDefinition>()
|
||||||
|
{
|
||||||
|
new StageDefinition() { Columns = 2 },
|
||||||
|
new StageDefinition() { Columns = 4 },
|
||||||
|
new StageDefinition() { Columns = 2 },
|
||||||
|
};
|
||||||
|
createPlayfield(stages, SpecialColumnPosition.Normal);
|
||||||
|
});
|
||||||
|
AddStep("1 + 1 + 8 columns", () =>
|
||||||
|
{
|
||||||
|
var stages = new List<StageDefinition>()
|
||||||
|
{
|
||||||
|
new StageDefinition() { Columns = 1 },
|
||||||
|
new StageDefinition() { Columns = 8 },
|
||||||
|
new StageDefinition() { Columns = 1 },
|
||||||
|
};
|
||||||
|
createPlayfield(stages, SpecialColumnPosition.Normal);
|
||||||
|
});
|
||||||
|
|
||||||
AddStep("Left special style", () => createPlayfield(8, SpecialColumnPosition.Left));
|
AddStep("Left special style", () => createPlayfield(8, SpecialColumnPosition.Left));
|
||||||
AddStep("Right special style", () => createPlayfield(8, SpecialColumnPosition.Right));
|
AddStep("Right special style", () => createPlayfield(8, SpecialColumnPosition.Right));
|
||||||
AddStep("Reversed", () => createPlayfield(4, SpecialColumnPosition.Normal, true));
|
AddStep("Reversed", () => createPlayfield(4, SpecialColumnPosition.Normal, true));
|
||||||
@ -78,16 +108,22 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
|
|
||||||
private ManiaPlayfield createPlayfield(int cols, SpecialColumnPosition specialPos, bool inverted = false)
|
private ManiaPlayfield createPlayfield(int cols, SpecialColumnPosition specialPos, bool inverted = false)
|
||||||
{
|
{
|
||||||
Clear();
|
|
||||||
|
|
||||||
var inputManager = new ManiaInputManager(maniaRuleset, cols) { RelativeSizeAxes = Axes.Both };
|
|
||||||
Add(inputManager);
|
|
||||||
|
|
||||||
ManiaPlayfield playfield;
|
|
||||||
var stages = new List<StageDefinition>()
|
var stages = new List<StageDefinition>()
|
||||||
{
|
{
|
||||||
new StageDefinition() { Columns = cols },
|
new StageDefinition() { Columns = cols },
|
||||||
};
|
};
|
||||||
|
return createPlayfield(stages, specialPos, inverted);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ManiaPlayfield createPlayfield(List<StageDefinition> stages, SpecialColumnPosition specialPos, bool inverted = false)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
|
||||||
|
var inputManager = new ManiaInputManager(maniaRuleset, stages.Sum(g => g.Columns)) { RelativeSizeAxes = Axes.Both };
|
||||||
|
Add(inputManager);
|
||||||
|
|
||||||
|
ManiaPlayfield playfield;
|
||||||
|
|
||||||
inputManager.Add(playfield = new ManiaPlayfield(stages)
|
inputManager.Add(playfield = new ManiaPlayfield(stages)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
|
@ -11,7 +11,6 @@ using osu.Framework.MathUtils;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||||
using osu.Game.Rulesets.Mania.Mods;
|
|
||||||
using osu.Game.Rulesets.Mania.Objects;
|
using osu.Game.Rulesets.Mania.Objects;
|
||||||
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Mania.Replays;
|
using osu.Game.Rulesets.Mania.Replays;
|
||||||
|
Loading…
Reference in New Issue
Block a user