1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:47:24 +08:00
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneParallaxContainer.cs
2022-06-17 16:37:17 +09:00

34 lines
1.2 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Game.Graphics.Containers;
using osu.Game.Screens.Backgrounds;
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestSceneParallaxContainer : OsuTestScene
{
public TestSceneParallaxContainer()
{
ParallaxContainer parallax;
Add(parallax = new ParallaxContainer
{
Child = new ScreenStack(new BackgroundScreenDefault { Alpha = 0.8f })
{
RelativeSizeAxes = Axes.Both,
}
});
AddStep("default parallax", () => parallax.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT);
AddStep("high parallax", () => parallax.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT * 10);
AddStep("no parallax", () => parallax.ParallaxAmount = 0);
AddStep("negative parallax", () => parallax.ParallaxAmount = -ParallaxContainer.DEFAULT_PARALLAX_AMOUNT);
}
}
}