mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:07:52 +08:00
Added an option to not scale the slider body for Grow/Deflate mods
This commit is contained in:
parent
aa0677630f
commit
e1aa0bfe6d
@ -24,6 +24,9 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
[SettingSource("Starting Size", "The initial size multiplier applied to all objects.")]
|
[SettingSource("Starting Size", "The initial size multiplier applied to all objects.")]
|
||||||
public abstract BindableNumber<float> StartScale { get; }
|
public abstract BindableNumber<float> StartScale { get; }
|
||||||
|
|
||||||
|
[SettingSource("Scale Sliders", "Scale the slider bodies as well.")]
|
||||||
|
public BindableBool ScaleSliders { get; } = new BindableBool(true);
|
||||||
|
|
||||||
protected virtual float EndScale => 1;
|
protected virtual float EndScale => 1;
|
||||||
|
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(IRequiresApproachCircles), typeof(OsuModSpinIn), typeof(OsuModObjectScaleTween) };
|
public override Type[] IncompatibleMods => new[] { typeof(IRequiresApproachCircles), typeof(OsuModSpinIn), typeof(OsuModObjectScaleTween) };
|
||||||
@ -42,20 +45,12 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
var h = (OsuHitObject)drawable.HitObject;
|
var h = (OsuHitObject)drawable.HitObject;
|
||||||
|
|
||||||
// apply grow effect
|
// apply grow effect
|
||||||
switch (drawable)
|
if ((drawable is DrawableSlider && ScaleSliders.Value)
|
||||||
|
|| (drawable is DrawableSliderHead && !ScaleSliders.Value)
|
||||||
|
|| drawable is DrawableHitCircle)
|
||||||
{
|
{
|
||||||
case DrawableSliderHead:
|
using (drawable.BeginAbsoluteSequence(h.StartTime - h.TimePreempt))
|
||||||
case DrawableSliderTail:
|
drawable.ScaleTo(StartScale.Value).Then().ScaleTo(EndScale, h.TimePreempt, Easing.OutSine);
|
||||||
// special cases we should *not* be scaling.
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DrawableSlider:
|
|
||||||
case DrawableHitCircle:
|
|
||||||
{
|
|
||||||
using (drawable.BeginAbsoluteSequence(h.StartTime - h.TimePreempt))
|
|
||||||
drawable.ScaleTo(StartScale.Value).Then().ScaleTo(EndScale, h.TimePreempt, Easing.OutSine);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove approach circles
|
// remove approach circles
|
||||||
|
Loading…
Reference in New Issue
Block a user