mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Make Path.Distance a property again
This commit is contained in:
@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
/// </summary>
|
||||
public SliderPath Path { get; set; }
|
||||
|
||||
public double Distance => Path.GetDistance();
|
||||
public double Distance => Path.Distance;
|
||||
|
||||
public List<List<SampleInfo>> NodeSamples { get; set; }
|
||||
public int RepeatCount { get; set; }
|
||||
|
@ -137,7 +137,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
|
||||
private double progressToDistance(double progress)
|
||||
{
|
||||
return MathHelper.Clamp(progress, 0, 1) * GetDistance();
|
||||
return MathHelper.Clamp(progress, 0, 1) * Distance;
|
||||
}
|
||||
|
||||
private Vector2 interpolateVertices(int i, double d)
|
||||
@ -164,7 +164,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
return p0 + (p1 - p0) * (float)w;
|
||||
}
|
||||
|
||||
public double GetDistance() => cumulativeLength.Count == 0 ? 0 : cumulativeLength[cumulativeLength.Count - 1];
|
||||
public double Distance => cumulativeLength.Count == 0 ? 0 : cumulativeLength[cumulativeLength.Count - 1];
|
||||
|
||||
/// <summary>
|
||||
/// Computes the slider path until a given progress that ranges from 0 (beginning of the slider)
|
||||
|
Reference in New Issue
Block a user