mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:52:55 +08:00
Forward shakes from slider head objects to sliders
This commit is contained in:
parent
558b2622a7
commit
d453414070
@ -72,7 +72,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
private OsuInputManager osuActionInputManager;
|
||||
internal OsuInputManager OsuActionInputManager => osuActionInputManager ?? (osuActionInputManager = GetContainingInputManager() as OsuInputManager);
|
||||
|
||||
protected void Shake()
|
||||
protected virtual void Shake()
|
||||
{
|
||||
shakeContainer.Shake();
|
||||
}
|
||||
|
@ -52,7 +52,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
AlwaysPresent = true,
|
||||
Alpha = 0
|
||||
},
|
||||
HeadCircle = new DrawableSliderHead(s, s.HeadCircle),
|
||||
HeadCircle = new DrawableSliderHead(s, s.HeadCircle)
|
||||
{
|
||||
OnShake = Shake
|
||||
},
|
||||
TailCircle = new DrawableSliderTail(s, s.TailCircle)
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using OpenTK;
|
||||
|
||||
@ -28,5 +29,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
if (!IsHit)
|
||||
Position = slider.CurvePositionAt(completionProgress);
|
||||
}
|
||||
|
||||
public Action OnShake;
|
||||
|
||||
protected override void Shake() => OnShake?.Invoke();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user