2020-04-02 09:39:49 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2020-04-02 09:39:49 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Rulesets.Mania.Beatmaps;
|
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|
|
|
{
|
|
|
|
public class TestScenePlayfield : ManiaSkinnableTestScene
|
|
|
|
{
|
|
|
|
private List<StageDefinition> stageDefinitions = new List<StageDefinition>();
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestSingleStage()
|
|
|
|
{
|
|
|
|
AddStep("create stage", () =>
|
|
|
|
{
|
|
|
|
stageDefinitions = new List<StageDefinition>
|
|
|
|
{
|
|
|
|
new StageDefinition { Columns = 2 }
|
|
|
|
};
|
|
|
|
|
2021-06-02 07:04:53 +00:00
|
|
|
SetContents(_ => new ManiaPlayfield(stageDefinitions));
|
2020-04-02 09:39:49 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestDualStages()
|
|
|
|
{
|
|
|
|
AddStep("create stage", () =>
|
|
|
|
{
|
|
|
|
stageDefinitions = new List<StageDefinition>
|
|
|
|
{
|
|
|
|
new StageDefinition { Columns = 2 },
|
|
|
|
new StageDefinition { Columns = 2 }
|
|
|
|
};
|
|
|
|
|
2021-06-02 07:04:53 +00:00
|
|
|
SetContents(_ => new ManiaPlayfield(stageDefinitions));
|
2020-04-02 09:39:49 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override IBeatmap CreateBeatmapForSkinProvider()
|
|
|
|
{
|
|
|
|
var maniaBeatmap = (ManiaBeatmap)base.CreateBeatmapForSkinProvider();
|
|
|
|
maniaBeatmap.Stages = stageDefinitions;
|
|
|
|
return maniaBeatmap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|