1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-27 06:22:55 +08:00
osu-lazer/osu.Game.Rulesets.Osu.Tests/TestCaseSpinnerSelectionBlueprint.cs

51 lines
1.7 KiB
C#
Raw Normal View History

// 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.
2018-10-29 17:23:23 +08:00
using System;
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Edit;
2018-11-07 15:08:56 +08:00
using osu.Game.Rulesets.Osu.Edit.Blueprints.Spinners;
using osu.Game.Rulesets.Osu.Edit.Blueprints.Spinners.Components;
2018-10-29 17:23:23 +08:00
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Tests.Visual;
2018-11-20 15:51:59 +08:00
using osuTK;
2018-10-29 17:23:23 +08:00
namespace osu.Game.Rulesets.Osu.Tests
{
2018-11-06 17:06:13 +08:00
public class TestCaseSpinnerSelectionBlueprint : SelectionBlueprintTestCase
2018-10-29 17:23:23 +08:00
{
public override IReadOnlyList<Type> RequiredTypes => new[]
{
2018-11-06 16:56:04 +08:00
typeof(SpinnerSelectionBlueprint),
2018-10-29 17:23:23 +08:00
typeof(SpinnerPiece)
};
private readonly DrawableSpinner drawableSpinner;
2018-11-06 17:06:13 +08:00
public TestCaseSpinnerSelectionBlueprint()
2018-10-29 17:23:23 +08:00
{
var spinner = new Spinner
{
Position = new Vector2(256, 256),
StartTime = -1000,
EndTime = 2000
};
spinner.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty { CircleSize = 2 });
Add(new Container
{
RelativeSizeAxes = Axes.Both,
Size = new Vector2(0.5f),
Child = drawableSpinner = new DrawableSpinner(spinner)
});
}
2018-11-07 14:04:48 +08:00
protected override SelectionBlueprint CreateBlueprint() => new SpinnerSelectionBlueprint(drawableSpinner) { Size = new Vector2(0.5f) };
2018-10-29 17:23:23 +08:00
}
}