Simplify code

This commit is contained in:
Salman Ahmed 2023-09-24 02:22:50 +03:00
parent 7c40072c47
commit 734ee0e68b
1 changed files with 3 additions and 1 deletions

View File

@ -61,11 +61,13 @@ 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();
OsuHitObject firstObject = drawableRuleset.Beatmap.HitObjects.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)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;