mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 15:02:54 +08:00
Fix hidden mod support for sliderendcircle
This commit is contained in:
parent
f0eae02471
commit
5a6c45e2ff
@ -39,6 +39,9 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
base.ApplyToDrawableHitObjects(drawables);
|
||||
}
|
||||
|
||||
private double lastSliderHeadFadeOutStartTime;
|
||||
private double lastSliderHeadFadeOutDuration;
|
||||
|
||||
protected override void ApplyHiddenState(DrawableHitObject drawable, ArmedState state)
|
||||
{
|
||||
if (!(drawable is DrawableOsuHitObject d))
|
||||
@ -54,7 +57,35 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
switch (drawable)
|
||||
{
|
||||
case DrawableSliderTail sliderTail:
|
||||
// use stored values from head circle to achieve same fade sequence.
|
||||
fadeOutDuration = lastSliderHeadFadeOutDuration;
|
||||
fadeOutStartTime = lastSliderHeadFadeOutStartTime;
|
||||
|
||||
using (drawable.BeginAbsoluteSequence(fadeOutStartTime, true))
|
||||
sliderTail.FadeOut(fadeOutDuration);
|
||||
|
||||
break;
|
||||
|
||||
case DrawableSliderRepeat sliderRepeat:
|
||||
// use stored values from head circle to achieve same fade sequence.
|
||||
fadeOutDuration = lastSliderHeadFadeOutDuration;
|
||||
fadeOutStartTime = lastSliderHeadFadeOutStartTime;
|
||||
|
||||
using (drawable.BeginAbsoluteSequence(fadeOutStartTime, true))
|
||||
// only apply to circle piece – reverse arrow is not affected by hidden.
|
||||
sliderRepeat.CirclePiece.FadeOut(fadeOutDuration);
|
||||
|
||||
break;
|
||||
|
||||
case DrawableHitCircle circle:
|
||||
|
||||
if (circle is DrawableSliderHead)
|
||||
{
|
||||
lastSliderHeadFadeOutDuration = fadeOutDuration;
|
||||
lastSliderHeadFadeOutStartTime = fadeOutStartTime;
|
||||
}
|
||||
|
||||
// we don't want to see the approach circle
|
||||
using (circle.BeginAbsoluteSequence(h.StartTime - h.TimePreempt, true))
|
||||
circle.ApproachCircle.Hide();
|
||||
|
@ -24,6 +24,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
|
||||
private readonly Drawable scaleContainer;
|
||||
|
||||
public readonly Drawable CirclePiece;
|
||||
|
||||
public override bool DisplayResult => false;
|
||||
|
||||
public DrawableSliderRepeat(SliderRepeat sliderRepeat, DrawableSlider drawableSlider)
|
||||
@ -44,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
Children = new Drawable[]
|
||||
{
|
||||
// no default for this; only visible in legacy skins.
|
||||
new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.SliderTailHitCircle), _ => Empty()),
|
||||
CirclePiece = new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.SliderTailHitCircle), _ => Empty()),
|
||||
arrow = new ReverseArrowPiece(),
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user