Hide sliderend & repeat circles in traceable mod

This commit is contained in:
Bartłomiej Dach 2020-10-25 23:24:14 +01:00
parent bab8c7480d
commit 0a23e994e2

View File

@ -6,6 +6,7 @@ using System.Linq;
using osu.Framework.Bindables;
using System.Collections.Generic;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects.Drawables;
@ -49,9 +50,16 @@ namespace osu.Game.Rulesets.Osu.Mods
{
case DrawableHitCircle circle:
// we only want to see the approach circle
using (circle.BeginAbsoluteSequence(h.StartTime - h.TimePreempt, true))
circle.CirclePiece.Hide();
applyCirclePieceState(circle, circle.CirclePiece);
break;
case DrawableSliderTail sliderTail:
applyCirclePieceState(sliderTail);
break;
case DrawableSliderRepeat sliderRepeat:
// show only the repeat arrow
applyCirclePieceState(sliderRepeat, sliderRepeat.CirclePiece);
break;
case DrawableSlider slider:
@ -61,6 +69,13 @@ namespace osu.Game.Rulesets.Osu.Mods
}
}
private void applyCirclePieceState(DrawableOsuHitObject hitObject, IDrawable hitCircle = null)
{
var h = hitObject.HitObject;
using (hitObject.BeginAbsoluteSequence(h.StartTime - h.TimePreempt, true))
(hitCircle ?? hitObject).Hide();
}
private void applySliderState(DrawableSlider slider)
{
((PlaySliderBody)slider.Body.Drawable).AccentColour = slider.AccentColour.Value.Opacity(0);