Get first Spinner,Slider or HitCircle instead of only HitCircle

Fixes bug
This commit is contained in:
Fabian van Oeffelt 2023-09-23 13:18:49 +02:00
parent d18bd2d2ac
commit 7c40072c47
1 changed files with 3 additions and 3 deletions

View File

@ -61,11 +61,11 @@ public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
{
OsuHitObject firstObject = drawableRuleset.Beatmap.HitObjects.Where(o => o is Spinner || o is Slider || o is HitCircle).First();
// Multiplying by 2 results in an initial size that is too large, hence 1.90 has been chosen
// Also avoids the HitObject bleeding around the edges of the bubble drawable at minimum size
bubbleSize = (float)(drawableRuleset.Beatmap.HitObjects.OfType<HitCircle>().First().Radius * 1.90f);
bubbleFade = drawableRuleset.Beatmap.HitObjects.OfType<HitCircle>().First().TimePreempt * 2;
bubbleSize = (float)firstObject.Radius * 1.90f;
bubbleFade = firstObject.TimePreempt * 2;
// We want to hide the judgements since they are obscured by the BubbleDrawable (due to layering)
drawableRuleset.Playfield.DisplayJudgements.Value = false;