mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 21:57:24 +09:00
Merge pull request #10257 from hbnrmx/legacy-SpinnerNoBlink
Add support for SpinnerNoBlink to LegacyOldStyleSpinner
This commit is contained in:
commit
c93d1631d4
@ -24,12 +24,16 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
private Sprite metreSprite;
|
private Sprite metreSprite;
|
||||||
private Container metre;
|
private Container metre;
|
||||||
|
|
||||||
|
private bool spinnerBlink;
|
||||||
|
|
||||||
private const float sprite_scale = 1 / 1.6f;
|
private const float sprite_scale = 1 / 1.6f;
|
||||||
private const float final_metre_height = 692 * sprite_scale;
|
private const float final_metre_height = 692 * sprite_scale;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ISkinSource source, DrawableHitObject drawableObject)
|
private void load(ISkinSource source, DrawableHitObject drawableObject)
|
||||||
{
|
{
|
||||||
|
spinnerBlink = source.GetConfig<OsuSkinConfiguration, bool>(OsuSkinConfiguration.SpinnerNoBlink)?.Value != true;
|
||||||
|
|
||||||
drawableSpinner = (DrawableSpinner)drawableObject;
|
drawableSpinner = (DrawableSpinner)drawableObject;
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
@ -116,12 +120,15 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
|
|
||||||
private float getMetreHeight(float progress)
|
private float getMetreHeight(float progress)
|
||||||
{
|
{
|
||||||
progress = Math.Min(99, progress * 100);
|
progress *= 100;
|
||||||
|
|
||||||
|
// the spinner should still blink at 100% progress.
|
||||||
|
if (spinnerBlink)
|
||||||
|
progress = Math.Min(99, progress);
|
||||||
|
|
||||||
int barCount = (int)progress / 10;
|
int barCount = (int)progress / 10;
|
||||||
|
|
||||||
// todo: add SpinnerNoBlink support
|
if (spinnerBlink && RNG.NextBool(((int)progress % 10) / 10f))
|
||||||
if (RNG.NextBool(((int)progress % 10) / 10f))
|
|
||||||
barCount++;
|
barCount++;
|
||||||
|
|
||||||
return (float)barCount / total_bars * final_metre_height;
|
return (float)barCount / total_bars * final_metre_height;
|
||||||
|
@ -14,6 +14,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
CursorRotate,
|
CursorRotate,
|
||||||
HitCircleOverlayAboveNumber,
|
HitCircleOverlayAboveNumber,
|
||||||
HitCircleOverlayAboveNumer, // Some old skins will have this typo
|
HitCircleOverlayAboveNumer, // Some old skins will have this typo
|
||||||
SpinnerFrequencyModulate
|
SpinnerFrequencyModulate,
|
||||||
|
SpinnerNoBlink
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Skinning
|
|||||||
ComboPrefix,
|
ComboPrefix,
|
||||||
ComboOverlap,
|
ComboOverlap,
|
||||||
AnimationFramerate,
|
AnimationFramerate,
|
||||||
LayeredHitSounds,
|
LayeredHitSounds
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user