1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 05:27:24 +08:00
osu-lazer/osu.Desktop.VisualTests/Tests/TestCaseManiaHitObjects.cs

81 lines
2.8 KiB
C#
Raw Normal View History

2017-05-03 14:50:42 +08:00
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2017-05-04 14:36:37 +08:00
using OpenTK.Graphics;
using OpenTK;
2017-05-03 14:50:42 +08:00
namespace osu.Desktop.VisualTests.Tests
{
internal class TestCaseManiaHitObjects : TestCase
{
public override void Reset()
{
base.Reset();
Add(new FillFlowContainer
2017-05-03 14:50:42 +08:00
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10, 0),
// Imagine that the containers containing the drawable notes are the "columns"
Children = new Drawable[]
2017-05-03 14:50:42 +08:00
{
new Container
2017-05-03 14:50:42 +08:00
{
Name = "Normal note column",
2017-05-03 14:50:42 +08:00
Anchor = Anchor.Centre,
2017-05-04 14:36:37 +08:00
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
Width = 50,
RelativeCoordinateSpace = new Vector2(1, 10000),
Children = new[]
{
new DrawableNote(new Note
{
StartTime = 5000
})
{
AccentColour = Color4.Red
}
}
},
new Container
{
Name = "Hold note column",
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
Width = 50,
RelativeCoordinateSpace = new Vector2(1, 10000),
Children = new[]
{
new DrawableHoldNote(new HoldNote
{
StartTime = 5000,
Duration = 1000,
})
{
AccentColour = Color4.Red,
Length = 0.4f
}
}
2017-05-03 14:50:42 +08:00
}
}
});
}
}
}