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

Rename PositionAt -> CurvePositionAt to represent its new meaning

This commit is contained in:
smoogipoo
2018-02-24 02:43:36 +09:00
Unverified
parent 996e605e61
commit 066abfbdbc
4 changed files with 5 additions and 5 deletions
@@ -104,7 +104,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
//todo: we probably want to reconsider this before adding scoring, but it looks and feels nice.
if (!HeadCircle.IsHit)
HeadCircle.Position = slider.PositionAt(completionProgress);
HeadCircle.Position = slider.CurvePositionAt(completionProgress);
foreach (var c in components.OfType<ISliderProgress>()) c.UpdateProgress(completionProgress);
foreach (var c in components.OfType<ITrackSnaking>()) c.UpdateSnakingPosition(slider.Curve.PositionAt(Body.SnakedStart ?? 0), slider.Curve.PositionAt(Body.SnakedEnd ?? 0));
@@ -142,7 +142,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public void UpdateProgress(double completionProgress)
{
Position = slider.PositionAt(completionProgress);
Position = slider.CurvePositionAt(completionProgress);
}
}
}
+2 -2
View File
@@ -23,8 +23,8 @@ 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) => StackedPosition + this.PositionAt(t);
public override Vector2 EndPosition => Position + this.PositionAt(1);
public Vector2 StackedPositionAt(double t) => StackedPosition + this.CurvePositionAt(t);
public override Vector2 EndPosition => Position + this.CurvePositionAt(1);
public SliderCurve Curve { get; } = new SliderCurve();
+1 -1
View File
@@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Objects.Types
/// <param name="obj">The curve.</param>
/// <param name="progress">[0, 1] where 0 is the start time of the <see cref="HitObject"/> and 1 is the end time of the <see cref="HitObject"/>.</param>
/// <returns>The position on the curve.</returns>
public static Vector2 PositionAt(this IHasCurve obj, double progress)
public static Vector2 CurvePositionAt(this IHasCurve obj, double progress)
=> obj.Curve.PositionAt(obj.ProgressAt(progress));
/// <summary>