mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Make TestCaseTaikoPlayfield work again.
This commit is contained in:
@ -27,6 +27,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
private readonly Random rng = new Random(1337);
|
private readonly Random rng = new Random(1337);
|
||||||
private TaikoPlayfield playfield;
|
private TaikoPlayfield playfield;
|
||||||
|
private Container playfieldContainer;
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
{
|
{
|
||||||
@ -51,11 +52,14 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
var rateAdjustClock = new StopwatchClock(true) { Rate = 1 };
|
var rateAdjustClock = new StopwatchClock(true) { Rate = 1 };
|
||||||
|
|
||||||
Add(new Container
|
Add(playfieldContainer = new Container
|
||||||
{
|
{
|
||||||
Clock = new FramedClock(rateAdjustClock),
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Y = 200,
|
Height = TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT,
|
||||||
|
Width = 0.8f,
|
||||||
|
Clock = new FramedClock(rateAdjustClock),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
playfield = new TaikoPlayfield()
|
playfield = new TaikoPlayfield()
|
||||||
@ -81,11 +85,11 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
addSwell(1000);
|
addSwell(1000);
|
||||||
playfield.Delay(scroll_time - 100);
|
playfieldContainer.Delay(scroll_time - 100);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
playfield.ResizeTo(new Vector2(1, rng.Next(25, 400)), 500);
|
playfieldContainer.ResizeTo(new Vector2(1, rng.Next(25, 400)), 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addHitJudgement()
|
private void addHitJudgement()
|
||||||
|
@ -38,6 +38,9 @@ namespace osu.Game.Modes.UI
|
|||||||
protected Playfield(float? customWidth = null)
|
protected Playfield(float? customWidth = null)
|
||||||
{
|
{
|
||||||
AlwaysReceiveInput = true;
|
AlwaysReceiveInput = true;
|
||||||
|
|
||||||
|
// Default height since we force RelativeSizeAxes = Both
|
||||||
|
Size = Vector2.One;
|
||||||
|
|
||||||
AddInternal(ScaledContent = new ScaledContainer
|
AddInternal(ScaledContent = new ScaledContainer
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user