1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +08:00
osu-lazer/osu.Game.Rulesets.Mania.Tests/TestSceneManiaHitObjectComposer.cs

68 lines
2.0 KiB
C#
Raw Normal View History

2020-04-28 13:47:52 +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.
using System;
using System.Collections.Generic;
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.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.Edit;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Screens.Edit;
using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Mania.Tests
{
public class TestSceneManiaHitObjectComposer : EditorClockTestScene
{
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(ManiaBlueprintContainer)
};
[Cached(typeof(EditorBeatmap))]
[Cached(typeof(IBeatSnapProvider))]
private readonly EditorBeatmap editorBeatmap;
protected override Container<Drawable> Content { get; }
public TestSceneManiaHitObjectComposer()
{
base.Content.Add(new Container
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
editorBeatmap = new EditorBeatmap(new ManiaBeatmap(new StageDefinition { Columns = 4 }))
{
BeatmapInfo = { Ruleset = new ManiaRuleset().RulesetInfo }
},
Content = new Container
{
RelativeSizeAxes = Axes.Both,
}
},
});
for (int i = 0; i < 10; i++)
{
editorBeatmap.Add(new Note { StartTime = 100 * i });
}
}
[SetUp]
public void Setup() => Schedule(() =>
{
Children = new Drawable[]
{
2020-04-28 14:34:41 +08:00
new ManiaHitObjectComposer(new ManiaRuleset())
2020-04-28 13:47:52 +08:00
};
BeatDivisor.Value = 8;
});
}
}