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

69 lines
2.3 KiB
C#
Raw Normal View History

2018-01-05 19:21:19 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
2018-03-02 14:34:31 +08:00
using NUnit.Framework;
using osu.Framework.Allocation;
using OpenTK;
2018-01-30 17:22:40 +08:00
using osu.Game.Beatmaps;
2018-02-22 13:22:04 +08:00
using osu.Game.Rulesets.Edit;
2017-12-11 21:20:07 +08:00
using osu.Game.Rulesets.Edit.Layers.Selection;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Edit;
using osu.Game.Rulesets.Osu.Edit.Layers.Selection;
using osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Tests.Beatmaps;
namespace osu.Game.Tests.Visual
{
2018-03-02 14:34:31 +08:00
[TestFixture]
2017-12-08 16:41:10 +08:00
public class TestCaseEditorSelectionLayer : OsuTestCase
{
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(SelectionBox),
typeof(SelectionLayer),
typeof(CaptureBox),
typeof(HitObjectComposer),
typeof(OsuHitObjectComposer),
typeof(HitObjectOverlayLayer),
typeof(OsuHitObjectOverlayLayer),
typeof(HitObjectOverlay),
typeof(HitCircleOverlay),
typeof(SliderOverlay),
typeof(SliderCircleOverlay)
};
[BackgroundDependencyLoader]
private void load(OsuGameBase osuGame)
{
osuGame.Beatmap.Value = new TestWorkingBeatmap(new Beatmap
{
HitObjects = new List<HitObject>
{
new HitCircle { Position = new Vector2(256, 192), Scale = 0.5f },
new HitCircle { Position = new Vector2(344, 148), Scale = 0.5f },
new Slider
{
2018-02-23 20:03:45 +08:00
Position = new Vector2(128, 256),
ControlPoints = new List<Vector2>
{
2018-02-23 20:03:45 +08:00
Vector2.Zero,
new Vector2(216, 0),
},
Distance = 400,
Velocity = 1,
TickDistance = 100,
Scale = 0.5f,
}
},
});
2018-01-30 17:22:40 +08:00
Child = new OsuHitObjectComposer(new OsuRuleset());
}
}
}