mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 11:42:55 +08:00
Change switchexpr to standard switch statement
This commit is contained in:
parent
577cb9994c
commit
25c1a90047
@ -46,14 +46,29 @@ namespace osu.Game.Rulesets.Objects.Types
|
|||||||
return new PathType { Type = SplineType.BSpline, Degree = degree };
|
return new PathType { Type = SplineType.BSpline, Degree = degree };
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Description => Type switch
|
public string Description
|
||||||
{
|
{
|
||||||
SplineType.Catmull => "Catmull",
|
get
|
||||||
SplineType.BSpline => Degree == null ? "Bezier" : "B-Spline",
|
{
|
||||||
SplineType.Linear => "Linear",
|
switch (Type)
|
||||||
SplineType.PerfectCurve => "Perfect Curve",
|
{
|
||||||
_ => Type.ToString()
|
case SplineType.Catmull:
|
||||||
};
|
return "Catmull";
|
||||||
|
|
||||||
|
case SplineType.BSpline:
|
||||||
|
return Degree == null ? "Bezier" : "B-Spline";
|
||||||
|
|
||||||
|
case SplineType.Linear:
|
||||||
|
return "Linear";
|
||||||
|
|
||||||
|
case SplineType.PerfectCurve:
|
||||||
|
return "Perfect Curve";
|
||||||
|
|
||||||
|
default:
|
||||||
|
return Type.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
=> HashCode.Combine(Type, Degree);
|
=> HashCode.Combine(Type, Degree);
|
||||||
|
Loading…
Reference in New Issue
Block a user