2022-08-08 08:38:46 +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.
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Game.Rulesets.Mania.Beatmaps;
|
|
|
|
using osu.Game.Rulesets.Mania.Objects;
|
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|
|
|
{
|
|
|
|
public partial class TestSceneBarLine : ManiaSkinnableTestScene
|
|
|
|
{
|
|
|
|
[Test]
|
|
|
|
public void TestMinor()
|
|
|
|
{
|
2024-01-21 03:17:16 +00:00
|
|
|
AddStep("Create barlines", recreate);
|
2022-08-08 08:38:46 +00:00
|
|
|
}
|
|
|
|
|
2024-01-21 03:17:16 +00:00
|
|
|
private void recreate()
|
2022-08-08 08:38:46 +00:00
|
|
|
{
|
|
|
|
var stageDefinitions = new List<StageDefinition>
|
|
|
|
{
|
2022-10-05 10:14:31 +00:00
|
|
|
new StageDefinition(4),
|
2022-08-08 08:38:46 +00:00
|
|
|
};
|
|
|
|
|
2024-01-21 03:17:16 +00:00
|
|
|
SetContents(_ =>
|
2022-08-08 08:38:46 +00:00
|
|
|
{
|
2024-01-21 03:17:16 +00:00
|
|
|
var maniaPlayfield = new ManiaPlayfield(stageDefinitions);
|
2022-08-08 08:38:46 +00:00
|
|
|
|
2024-01-21 03:17:16 +00:00
|
|
|
// Must be scheduled so the pool is loaded before we try and retrieve from it.
|
|
|
|
Schedule(() =>
|
2022-08-08 08:38:46 +00:00
|
|
|
{
|
2024-01-21 03:17:16 +00:00
|
|
|
for (int i = 0; i < 64; i++)
|
2022-08-08 08:38:46 +00:00
|
|
|
{
|
2024-01-21 03:17:16 +00:00
|
|
|
maniaPlayfield.Add(new BarLine
|
|
|
|
{
|
|
|
|
StartTime = Time.Current + i * 500,
|
|
|
|
Major = i % 4 == 0,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
return maniaPlayfield;
|
|
|
|
});
|
2022-08-08 08:38:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|