mirror of
https://github.com/ppy/osu.git
synced 2025-02-10 08:52:54 +08:00
Fix height of playfield in taiko tests
This commit is contained in:
parent
2648175275
commit
ddc2ed1542
@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
var cont = new Container
|
var cont = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 0.8f,
|
Height = 0.2f,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
var cont = new Container
|
var cont = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 0.8f,
|
Height = 0.2f,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -88,7 +88,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
var barLine = new BarLine
|
var barLine = new BarLine
|
||||||
{
|
{
|
||||||
Major = major,
|
Major = major,
|
||||||
StartTime = Time.Current + 2000,
|
StartTime = Time.Current + 5000,
|
||||||
};
|
};
|
||||||
|
|
||||||
var cpi = new ControlPointInfo();
|
var cpi = new ControlPointInfo();
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -25,11 +26,10 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
TimeRange = { Value = 5000 },
|
TimeRange = { Value = 5000 },
|
||||||
};
|
};
|
||||||
|
|
||||||
public TestSceneTaikoPlayfield()
|
[SetUpSteps]
|
||||||
|
public void SetUpSteps()
|
||||||
{
|
{
|
||||||
TaikoBeatmap beatmap;
|
TaikoBeatmap beatmap;
|
||||||
bool kiai = false;
|
|
||||||
|
|
||||||
AddStep("set beatmap", () =>
|
AddStep("set beatmap", () =>
|
||||||
{
|
{
|
||||||
Beatmap.Value = CreateWorkingBeatmap(beatmap = new TaikoBeatmap());
|
Beatmap.Value = CreateWorkingBeatmap(beatmap = new TaikoBeatmap());
|
||||||
@ -41,12 +41,28 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
|
|
||||||
AddStep("Load playfield", () => SetContents(_ => new TaikoPlayfield
|
AddStep("Load playfield", () => SetContents(_ => new TaikoPlayfield
|
||||||
{
|
{
|
||||||
|
Height = 0.2f,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = 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);
|
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", () =>
|
AddStep("Toggle kiai", () =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user