1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-20 06:39:54 +08:00

Create Slider.StackedPositionAt method

This commit is contained in:
Thomas Tan
2018-01-29 16:22:14 +08:00
Unverified
parent f66ecae3ff
commit c36859ea3a
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -23,6 +23,7 @@ namespace osu.Game.Rulesets.Osu.Objects
public double EndTime => StartTime + this.SpanCount() * Curve.Distance / Velocity;
public double Duration => EndTime - StartTime;
public Vector2 StackedPositionAt(double t) => this.PositionAt(t) + this.StackOffset;
public override Vector2 EndPosition => this.PositionAt(1);
public SliderCurve Curve { get; } = new SliderCurve();
@@ -95,7 +95,7 @@ namespace osu.Game.Rulesets.Osu.OsuDifficulty.Preprocessing
var computeVertex = new Action<double>(t =>
{
// ReSharper disable once PossibleInvalidOperationException (bugged in current r# version)
var diff = slider.PositionAt(t) + slider.StackOffset - slider.LazyEndPosition.Value;
var diff = slider.StackedPositionAt(t) - slider.LazyEndPosition.Value;
float dist = diff.Length;
if (dist > approxFollowCircleRadius)