mirror of
https://github.com/ppy/osu
synced 2025-02-14 17:17:15 +00:00
Merge pull request #10595 from bdach/traceable-hide-hit-circles
This commit is contained in:
commit
38ca5548f4
@ -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;
|
||||
@ -38,20 +39,25 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
protected void ApplyTraceableState(DrawableHitObject drawable, ArmedState state)
|
||||
{
|
||||
if (!(drawable is DrawableOsuHitObject drawableOsu))
|
||||
if (!(drawable is DrawableOsuHitObject))
|
||||
return;
|
||||
|
||||
var h = drawableOsu.HitObject;
|
||||
|
||||
//todo: expose and hide spinner background somehow
|
||||
|
||||
switch (drawable)
|
||||
{
|
||||
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 +67,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);
|
||||
|
Loading…
Reference in New Issue
Block a user