Extract combo scale to virtual function

This commit is contained in:
Dan Balasescu 2022-10-07 14:26:19 +09:00
parent dfb143ec0b
commit 7385ef3e1b

View File

@ -149,16 +149,21 @@ namespace osu.Game.Rulesets.Mods
float size = defaultFlashlightSize * sizeMultiplier; float size = defaultFlashlightSize * sizeMultiplier;
if (comboBasedSize) if (comboBasedSize)
{ size *= GetComboScaleFor(combo);
if (combo >= 200)
size *= 0.625f;
else if (combo >= 100)
size *= 0.8125f;
}
return size; return size;
} }
protected virtual float GetComboScaleFor(int combo)
{
if (combo >= 200)
return 0.625f;
if (combo >= 100)
return 0.8125f;
return 1.0f;
}
private Vector2 flashlightPosition; private Vector2 flashlightPosition;
protected Vector2 FlashlightPosition protected Vector2 FlashlightPosition