1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 07:02:54 +08:00

Rename "easing" references to be "style" instead

This commit is contained in:
Dean Herbert 2021-06-16 15:15:12 +09:00
parent b1dd502e06
commit f6f1a068b2

View File

@ -22,8 +22,8 @@ namespace osu.Game.Rulesets.Osu.Mods
public override double ScoreMultiplier => 1; public override double ScoreMultiplier => 1;
public override IconUsage? Icon { get; } = FontAwesome.Regular.Circle; public override IconUsage? Icon { get; } = FontAwesome.Regular.Circle;
[SettingSource("Easing", "Change the animation curve of the approach circles.", 0)] [SettingSource("Style", "Change the animation style of the approach circles.", 0)]
public Bindable<ApproachCircleEasing> BindableEasing { get; } = new Bindable<ApproachCircleEasing>(); public Bindable<AnimationStyle> Style { get; } = new Bindable<AnimationStyle>();
[SettingSource("Initial size", "Change the initial size of the approach circle, relative to hit circles.", 1)] [SettingSource("Initial size", "Change the initial size of the approach circle, relative to hit circles.", 1)]
public BindableFloat Scale { get; } = new BindableFloat public BindableFloat Scale { get; } = new BindableFloat
@ -50,50 +50,50 @@ namespace osu.Game.Rulesets.Osu.Mods
hitCircle.ApproachCircle.FadeIn(Math.Min(obj.TimeFadeIn, obj.TimePreempt)); hitCircle.ApproachCircle.FadeIn(Math.Min(obj.TimeFadeIn, obj.TimePreempt));
hitCircle.ApproachCircle.ScaleTo(1f, obj.TimePreempt, getEasing(BindableEasing.Value)); hitCircle.ApproachCircle.ScaleTo(1f, obj.TimePreempt, getEasing(Style.Value));
hitCircle.ApproachCircle.Expire(true); hitCircle.ApproachCircle.Expire(true);
}; };
}); });
} }
private Easing getEasing(ApproachCircleEasing approachEasing) private Easing getEasing(AnimationStyle approachEasing)
{ {
switch (approachEasing) switch (approachEasing)
{ {
default: default:
return Easing.None; return Easing.None;
case ApproachCircleEasing.Accelerate1: case AnimationStyle.Accelerate1:
return Easing.In; return Easing.In;
case ApproachCircleEasing.Accelerate2: case AnimationStyle.Accelerate2:
return Easing.InCubic; return Easing.InCubic;
case ApproachCircleEasing.Accelerate3: case AnimationStyle.Accelerate3:
return Easing.InQuint; return Easing.InQuint;
case ApproachCircleEasing.Gravity: case AnimationStyle.Gravity:
return Easing.InBack; return Easing.InBack;
case ApproachCircleEasing.Decelerate1: case AnimationStyle.Decelerate1:
return Easing.Out; return Easing.Out;
case ApproachCircleEasing.Decelerate2: case AnimationStyle.Decelerate2:
return Easing.OutCubic; return Easing.OutCubic;
case ApproachCircleEasing.Decelerate3: case AnimationStyle.Decelerate3:
return Easing.OutQuint; return Easing.OutQuint;
case ApproachCircleEasing.InOut1: case AnimationStyle.InOut1:
return Easing.InOutCubic; return Easing.InOutCubic;
case ApproachCircleEasing.InOut2: case AnimationStyle.InOut2:
return Easing.InOutQuint; return Easing.InOutQuint;
} }
} }
public enum ApproachCircleEasing public enum AnimationStyle
{ {
Default, Default,
Accelerate1, Accelerate1,