mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +08:00
Change test to move only on a toggle step
This commit is contained in:
parent
6c6baab115
commit
38847c3ac5
@ -13,10 +13,10 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public partial class TestSceneGraph : OsuTestScene
|
public partial class TestSceneGraph : OsuTestScene
|
||||||
{
|
{
|
||||||
private readonly BarGraph graph;
|
|
||||||
|
|
||||||
public TestSceneGraph()
|
public TestSceneGraph()
|
||||||
{
|
{
|
||||||
|
BarGraph graph;
|
||||||
|
|
||||||
Child = graph = new BarGraph
|
Child = graph = new BarGraph
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -34,13 +34,14 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
AddStep("Top to bottom", () => graph.Direction = BarDirection.TopToBottom);
|
AddStep("Top to bottom", () => graph.Direction = BarDirection.TopToBottom);
|
||||||
AddStep("Left to right", () => graph.Direction = BarDirection.LeftToRight);
|
AddStep("Left to right", () => graph.Direction = BarDirection.LeftToRight);
|
||||||
AddStep("Right to left", () => graph.Direction = BarDirection.RightToLeft);
|
AddStep("Right to left", () => graph.Direction = BarDirection.RightToLeft);
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
AddToggleStep("Toggle movement", enabled =>
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
if (enabled)
|
||||||
|
graph.MoveToY(-10, 1000).Then().MoveToY(10, 1000).Loop();
|
||||||
graph.MoveToY(-10, 1000).Then().MoveToY(10, 1000).Loop();
|
else
|
||||||
|
graph.ClearTransforms();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user