mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 21:23:04 +08:00
Update ParallaxContainer.cs
This commit is contained in:
parent
e83ac8b04c
commit
7f751d3653
@ -58,7 +58,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (parallaxEnabled) {
|
if (parallaxEnabled)
|
||||||
|
{
|
||||||
Vector2 offset = input.CurrentState.Mouse == null ? Vector2.Zero : ToLocalSpace(input.CurrentState.Mouse.NativeState.Position) - DrawSize / 2;
|
Vector2 offset = input.CurrentState.Mouse == null ? Vector2.Zero : ToLocalSpace(input.CurrentState.Mouse.NativeState.Position) - DrawSize / 2;
|
||||||
content.MoveTo(offset * ParallaxAmount, firstUpdate ? 0 : 1000, EasingTypes.OutQuint);
|
content.MoveTo(offset * ParallaxAmount, firstUpdate ? 0 : 1000, EasingTypes.OutQuint);
|
||||||
content.Scale = new Vector2(1 + ParallaxAmount);
|
content.Scale = new Vector2(1 + ParallaxAmount);
|
||||||
|
Loading…
Reference in New Issue
Block a user