1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 15:17:28 +08:00
osu-lazer/osu.Game/Screens/BackgroundScreenStack.cs

36 lines
1011 B
C#
Raw Normal View History

2019-01-29 20:48:35 +08:00
// 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.
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osuTK;
namespace osu.Game.Screens
{
public class BackgroundScreenStack : ScreenStack
{
public BackgroundScreenStack()
: base(false)
{
Scale = new Vector2(1.06f);
RelativeSizeAxes = Axes.Both;
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
}
//public float ParallaxAmount { set => parallax.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT * value; }
2019-04-25 16:36:17 +08:00
public void Push(BackgroundScreen screen)
{
if (screen == null)
return;
if (EqualityComparer<BackgroundScreen>.Default.Equals((BackgroundScreen)CurrentScreen, screen))
return;
base.Push(screen);
}
}
2019-01-29 20:48:35 +08:00
}