mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 09:27:18 +09:00
Add tests for ParallaxContainer
This commit is contained in:
parent
5f2d1d4a1e
commit
df0083e3d9
26
osu.Game.Tests/Visual/TestCaseParallaxContainer.cs
Normal file
26
osu.Game.Tests/Visual/TestCaseParallaxContainer.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Screens.Backgrounds;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual
|
||||||
|
{
|
||||||
|
public class TestCaseParallaxContainer : OsuTestCase
|
||||||
|
{
|
||||||
|
public TestCaseParallaxContainer()
|
||||||
|
{
|
||||||
|
ParallaxContainer parallax;
|
||||||
|
|
||||||
|
Add(parallax = new ParallaxContainer
|
||||||
|
{
|
||||||
|
Child = new BackgroundScreenDefault { Alpha = 0.8f }
|
||||||
|
});
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user