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
1 changed files with 14 additions and 14 deletions

View File

@ -22,8 +22,8 @@ public class OsuModApproachDifferent : Mod, IApplicableToDrawableHitObjects
public override double ScoreMultiplier => 1;
public override IconUsage? Icon { get; } = FontAwesome.Regular.Circle;
[SettingSource("Easing", "Change the animation curve of the approach circles.", 0)]
public Bindable<ApproachCircleEasing> BindableEasing { get; } = new Bindable<ApproachCircleEasing>();
[SettingSource("Style", "Change the animation style of the approach circles.", 0)]
public Bindable<AnimationStyle> Style { get; } = new Bindable<AnimationStyle>();
[SettingSource("Initial size", "Change the initial size of the approach circle, relative to hit circles.", 1)]
public BindableFloat Scale { get; } = new BindableFloat
@ -50,50 +50,50 @@ public void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)
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);
};
});
}
private Easing getEasing(ApproachCircleEasing approachEasing)
private Easing getEasing(AnimationStyle approachEasing)
{
switch (approachEasing)
{
default:
return Easing.None;
case ApproachCircleEasing.Accelerate1:
case AnimationStyle.Accelerate1:
return Easing.In;
case ApproachCircleEasing.Accelerate2:
case AnimationStyle.Accelerate2:
return Easing.InCubic;
case ApproachCircleEasing.Accelerate3:
case AnimationStyle.Accelerate3:
return Easing.InQuint;
case ApproachCircleEasing.Gravity:
case AnimationStyle.Gravity:
return Easing.InBack;
case ApproachCircleEasing.Decelerate1:
case AnimationStyle.Decelerate1:
return Easing.Out;
case ApproachCircleEasing.Decelerate2:
case AnimationStyle.Decelerate2:
return Easing.OutCubic;
case ApproachCircleEasing.Decelerate3:
case AnimationStyle.Decelerate3:
return Easing.OutQuint;
case ApproachCircleEasing.InOut1:
case AnimationStyle.InOut1:
return Easing.InOutCubic;
case ApproachCircleEasing.InOut2:
case AnimationStyle.InOut2:
return Easing.InOutQuint;
}
}
public enum ApproachCircleEasing
public enum AnimationStyle
{
Default,
Accelerate1,