mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Reorder easing mapping to match enum order and throw on unknown animation style
This commit is contained in:
parent
aba9ed624a
commit
5001412a0d
@ -52,24 +52,27 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
switch (style)
|
||||
{
|
||||
default:
|
||||
case AnimationStyle.Linear:
|
||||
return Easing.None;
|
||||
|
||||
case AnimationStyle.Gravity:
|
||||
return Easing.InBack;
|
||||
|
||||
case AnimationStyle.InOut1:
|
||||
return Easing.InOutCubic;
|
||||
|
||||
case AnimationStyle.InOut2:
|
||||
return Easing.InOutQuint;
|
||||
|
||||
case AnimationStyle.Accelerate1:
|
||||
return Easing.In;
|
||||
|
||||
case AnimationStyle.Linear:
|
||||
return Easing.None;
|
||||
|
||||
case AnimationStyle.Accelerate2:
|
||||
return Easing.InCubic;
|
||||
|
||||
case AnimationStyle.Accelerate3:
|
||||
return Easing.InQuint;
|
||||
|
||||
case AnimationStyle.Gravity:
|
||||
return Easing.InBack;
|
||||
|
||||
case AnimationStyle.Decelerate1:
|
||||
return Easing.Out;
|
||||
|
||||
@ -79,11 +82,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
case AnimationStyle.Decelerate3:
|
||||
return Easing.OutQuint;
|
||||
|
||||
case AnimationStyle.InOut1:
|
||||
return Easing.InOutCubic;
|
||||
|
||||
case AnimationStyle.InOut2:
|
||||
return Easing.InOutQuint;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(style), style, @"Unsupported animation style");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user