mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
commit
c70c05c896
@ -69,9 +69,11 @@ namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
Vector2 offset = (input.CurrentState.Mouse == null ? Vector2.Zero : ToLocalSpace(input.CurrentState.Mouse.Position) - DrawSize / 2) * ParallaxAmount;
|
||||
|
||||
double elapsed = MathHelper.Clamp(Clock.ElapsedFrameTime, 0, 1000);
|
||||
const float parallax_duration = 100;
|
||||
|
||||
content.Position = Interpolation.ValueAt(elapsed, content.Position, offset, 0, 1000, Easing.OutQuint);
|
||||
double elapsed = MathHelper.Clamp(Clock.ElapsedFrameTime, 0, parallax_duration);
|
||||
|
||||
content.Position = Interpolation.ValueAt(elapsed, content.Position, offset, 0, parallax_duration, Easing.OutQuint);
|
||||
content.Scale = Interpolation.ValueAt(elapsed, content.Scale, new Vector2(1 + System.Math.Abs(ParallaxAmount)), 0, 1000, Easing.OutQuint);
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,8 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
||||
|
||||
public override float BackgroundParallaxAmount => 0.1f;
|
||||
|
||||
public override bool AllowBackButton => false;
|
||||
|
||||
public override bool HideOverlaysOnEnter => true;
|
||||
|
Loading…
Reference in New Issue
Block a user