2020-05-23 15:06:25 +08: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 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2020-05-23 15:06:25 +08:00
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Game.Rulesets.Edit;
|
|
|
|
using osu.Game.Rulesets.Taiko.Beatmaps;
|
2020-05-29 15:40:10 +08:00
|
|
|
using osu.Game.Rulesets.Taiko.Edit;
|
2020-05-23 15:06:25 +08:00
|
|
|
using osu.Game.Rulesets.Taiko.Objects;
|
|
|
|
using osu.Game.Screens.Edit;
|
|
|
|
using osu.Game.Tests.Visual;
|
|
|
|
|
2020-09-25 17:48:04 +08:00
|
|
|
namespace osu.Game.Rulesets.Taiko.Tests.Editor
|
2020-05-23 15:06:25 +08:00
|
|
|
{
|
|
|
|
public class TestSceneTaikoHitObjectComposer : EditorClockTestScene
|
|
|
|
{
|
|
|
|
[SetUp]
|
|
|
|
public void Setup() => Schedule(() =>
|
|
|
|
{
|
|
|
|
BeatDivisor.Value = 8;
|
2022-08-17 14:40:01 +08:00
|
|
|
EditorClock.Seek(0);
|
2020-05-23 15:06:25 +08:00
|
|
|
|
2020-05-25 18:23:36 +08:00
|
|
|
Child = new TestComposer { RelativeSizeAxes = Axes.Both };
|
2020-05-23 15:06:25 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void BasicTest()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
private class TestComposer : CompositeDrawable
|
|
|
|
{
|
|
|
|
[Cached(typeof(EditorBeatmap))]
|
|
|
|
[Cached(typeof(IBeatSnapProvider))]
|
|
|
|
public readonly EditorBeatmap EditorBeatmap;
|
|
|
|
|
|
|
|
public TestComposer()
|
|
|
|
{
|
|
|
|
InternalChildren = new Drawable[]
|
|
|
|
{
|
2022-01-12 22:17:35 +08:00
|
|
|
EditorBeatmap = new EditorBeatmap(new TaikoBeatmap
|
2020-05-23 15:06:25 +08:00
|
|
|
{
|
|
|
|
BeatmapInfo = { Ruleset = new TaikoRuleset().RulesetInfo }
|
2022-01-12 22:17:35 +08:00
|
|
|
}),
|
2020-05-25 18:23:36 +08:00
|
|
|
new TaikoHitObjectComposer(new TaikoRuleset())
|
2020-05-23 15:06:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
|
|
EditorBeatmap.Add(new Hit { StartTime = 125 * i });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|