mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Extract combo scale to virtual function
This commit is contained in:
parent
dfb143ec0b
commit
7385ef3e1b
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user