Rename ClampToPlayField

This commit is contained in:
Drison64 2022-09-21 17:14:02 +02:00
parent cc21e42e35
commit 86a09ad2cf
1 changed files with 5 additions and 5 deletions

View File

@ -85,7 +85,7 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
AddNested(new TinyDroplet
{
StartTime = t + lastEvent.Value.Time,
X = ClampToPlayField(EffectiveX + Path.PositionAt(
X = ClampToPlayfield(EffectiveX + Path.PositionAt(
lastEvent.Value.PathProgress + (t / sinceLastTick) * (e.PathProgress - lastEvent.Value.PathProgress)).X),
});
}
@ -103,7 +103,7 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
{
Samples = dropletSamples,
StartTime = e.Time,
X = ClampToPlayField(EffectiveX + Path.PositionAt(e.PathProgress).X),
X = ClampToPlayfield(EffectiveX + Path.PositionAt(e.PathProgress).X),
});
break;
@ -114,16 +114,16 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
{
Samples = this.GetNodeSamples(nodeIndex++),
StartTime = e.Time,
X = ClampToPlayField(EffectiveX + Path.PositionAt(e.PathProgress).X),
X = ClampToPlayfield(EffectiveX + Path.PositionAt(e.PathProgress).X),
});
break;
}
}
}
public float EndX => ClampToPlayField(EffectiveX + this.CurvePositionAt(1).X);
public float EndX => ClampToPlayfield(EffectiveX + this.CurvePositionAt(1).X);
public float ClampToPlayField(float value) => Math.Clamp(value, 0, CatchPlayfield.WIDTH);
public float ClampToPlayfield(float value) => Math.Clamp(value, 0, CatchPlayfield.WIDTH);
[JsonIgnore]
public double Duration