1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Rename ClampToPlayField

This commit is contained in:
Drison64 2022-09-21 17:14:02 +02:00
parent cc21e42e35
commit 86a09ad2cf

View File

@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Catch.Objects
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 @@ namespace osu.Game.Rulesets.Catch.Objects
{
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 @@ namespace osu.Game.Rulesets.Catch.Objects
{
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