1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 13:27:25 +08:00

Fix height of playfield in taiko tests

This commit is contained in:
Dean Herbert 2022-11-07 13:22:01 +09:00
parent 2648175275
commit ddc2ed1542
2 changed files with 23 additions and 7 deletions

View File

@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
var cont = new Container
{
RelativeSizeAxes = Axes.Both,
Height = 0.8f,
Height = 0.2f,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
var cont = new Container
{
RelativeSizeAxes = Axes.Both,
Height = 0.8f,
Height = 0.2f,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
@ -88,7 +88,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
var barLine = new BarLine
{
Major = major,
StartTime = Time.Current + 2000,
StartTime = Time.Current + 5000,
};
var cpi = new ControlPointInfo();

View File

@ -4,6 +4,7 @@
#nullable disable
using System;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics;
@ -25,11 +26,10 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
TimeRange = { Value = 5000 },
};
public TestSceneTaikoPlayfield()
[SetUpSteps]
public void SetUpSteps()
{
TaikoBeatmap beatmap;
bool kiai = false;
AddStep("set beatmap", () =>
{
Beatmap.Value = CreateWorkingBeatmap(beatmap = new TaikoBeatmap());
@ -41,12 +41,28 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
AddStep("Load playfield", () => SetContents(_ => new TaikoPlayfield
{
Height = 0.2f,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Height = 0.6f,
}));
}
[Test]
public void TestBasic()
{
AddStep("do nothing", () => { });
}
[Test]
public void TestHeightChanges()
{
AddRepeatStep("change height", () => this.ChildrenOfType<TaikoPlayfield>().ForEach(p => p.Height = Math.Max(0.2f, (p.Height + 0.2f) % 1f)), 50);
}
[Test]
public void TestKiai()
{
bool kiai = false;
AddStep("Toggle kiai", () =>
{