mirror of
https://github.com/ppy/osu
synced 2025-01-18 20:10:49 +00:00
Merge branch 'master' of github.com:ppy/osu into general-fixes
This commit is contained in:
commit
97b0da1d6b
@ -25,18 +25,20 @@ namespace osu.Game.Graphics.Containers
|
||||
}
|
||||
|
||||
private Container content;
|
||||
private InputManager input;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(UserInputManager input)
|
||||
{
|
||||
content.Position = (state.Mouse.Position - DrawSize / 2) * ParallaxAmount;
|
||||
return base.OnMouseMove(state);
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
content.Position = (ToLocalSpace(input.CurrentState.Mouse.NativeState.Position) - DrawSize / 2) * ParallaxAmount;
|
||||
content.Scale = new Vector2(1 + ParallaxAmount);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user