mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Apply a few minor refactors
This commit is contained in:
@ -36,11 +36,11 @@ namespace osu.Game.Screens
|
||||
Child = backgroundScreenStack = new BackgroundScreenStack { RelativeSizeAxes = Axes.Both },
|
||||
};
|
||||
|
||||
ScreenPushed += setParallax;
|
||||
ScreenExited += setParallax;
|
||||
ScreenPushed += onScreenChange;
|
||||
ScreenExited += onScreenChange;
|
||||
}
|
||||
|
||||
private void setParallax(IScreen prev, IScreen next)
|
||||
private void onScreenChange(IScreen prev, IScreen next)
|
||||
{
|
||||
parallaxContainer.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT * ((IOsuScreen)next)?.BackgroundParallaxAmount ?? 1.0f;
|
||||
}
|
||||
|
Reference in New Issue
Block a user