1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Change test to move only on a toggle step

This commit is contained in:
Dean Herbert 2023-11-08 17:23:01 +09:00
parent 6c6baab115
commit 38847c3ac5
No known key found for this signature in database

View File

@ -13,10 +13,10 @@ namespace osu.Game.Tests.Visual.Online
[TestFixture]
public partial class TestSceneGraph : OsuTestScene
{
private readonly BarGraph graph;
public TestSceneGraph()
{
BarGraph graph;
Child = graph = new BarGraph
{
RelativeSizeAxes = Axes.Both,
@ -34,13 +34,14 @@ namespace osu.Game.Tests.Visual.Online
AddStep("Top to bottom", () => graph.Direction = BarDirection.TopToBottom);
AddStep("Left to right", () => graph.Direction = BarDirection.LeftToRight);
AddStep("Right to left", () => graph.Direction = BarDirection.RightToLeft);
}
protected override void LoadComplete()
{
base.LoadComplete();
graph.MoveToY(-10, 1000).Then().MoveToY(10, 1000).Loop();
AddToggleStep("Toggle movement", enabled =>
{
if (enabled)
graph.MoveToY(-10, 1000).Then().MoveToY(10, 1000).Loop();
else
graph.ClearTransforms();
});
}
}
}