ControlPoint -> PathControlPoint

Also Curve -> Path.
This commit is contained in:
Dean Herbert
2018-11-01 03:52:24 +09:00
parent 9cb4374b51
commit bb2f8deb18
24 changed files with 92 additions and 92 deletions

View File

@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Osu.Objects
public event Action<Vector2[]> ControlPointsChanged;
public double EndTime => StartTime + this.SpanCount() * Curve.Distance / Velocity;
public double EndTime => StartTime + this.SpanCount() * Path.Distance / Velocity;
public double Duration => EndTime - StartTime;
public Vector2 StackedPositionAt(double t) => StackedPosition + this.CurvePositionAt(t);
@ -52,16 +52,16 @@ namespace osu.Game.Rulesets.Osu.Objects
}
}
public SliderCurve Curve { get; } = new SliderCurve();
public SliderPath Path { get; } = new SliderPath();
public Vector2[] ControlPoints
{
get => Curve.ControlPoints;
get => Path.ControlPoints;
set
{
if (Curve.ControlPoints == value)
if (Path.ControlPoints == value)
return;
Curve.ControlPoints = value;
Path.ControlPoints = value;
ControlPointsChanged?.Invoke(value);
@ -70,16 +70,16 @@ namespace osu.Game.Rulesets.Osu.Objects
}
}
public CurveType CurveType
public PathType PathType
{
get { return Curve.CurveType; }
set { Curve.CurveType = value; }
get { return Path.PathType; }
set { Path.PathType = value; }
}
public double Distance
{
get { return Curve.Distance; }
set { Curve.Distance = value; }
get { return Path.Distance; }
set { Path.Distance = value; }
}
public override Vector2 Position
@ -189,7 +189,7 @@ namespace osu.Game.Rulesets.Osu.Objects
private void createTicks()
{
var length = Curve.Distance;
var length = Path.Distance;
var tickDistance = MathHelper.Clamp(TickDistance, 0, length);
if (tickDistance == 0) return;
@ -228,7 +228,7 @@ namespace osu.Game.Rulesets.Osu.Objects
SpanIndex = span,
SpanStartTime = spanStartTime,
StartTime = spanStartTime + timeProgress * SpanDuration,
Position = Position + Curve.PositionAt(distanceProgress),
Position = Position + Path.PositionAt(distanceProgress),
StackHeight = StackHeight,
Scale = Scale,
Samples = sampleList
@ -246,7 +246,7 @@ namespace osu.Game.Rulesets.Osu.Objects
RepeatIndex = repeatIndex,
SpanDuration = SpanDuration,
StartTime = StartTime + repeat * SpanDuration,
Position = Position + Curve.PositionAt(repeat % 2),
Position = Position + Path.PositionAt(repeat % 2),
StackHeight = StackHeight,
Scale = Scale,
Samples = new List<SampleInfo>(RepeatSamples[repeatIndex])