mirror of https://github.com/ppy/osu
Rename ClampToPlayField
This commit is contained in:
parent
cc21e42e35
commit
86a09ad2cf
|
@ -85,7 +85,7 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
|
||||||
AddNested(new TinyDroplet
|
AddNested(new TinyDroplet
|
||||||
{
|
{
|
||||||
StartTime = t + lastEvent.Value.Time,
|
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),
|
lastEvent.Value.PathProgress + (t / sinceLastTick) * (e.PathProgress - lastEvent.Value.PathProgress)).X),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
|
||||||
{
|
{
|
||||||
Samples = dropletSamples,
|
Samples = dropletSamples,
|
||||||
StartTime = e.Time,
|
StartTime = e.Time,
|
||||||
X = ClampToPlayField(EffectiveX + Path.PositionAt(e.PathProgress).X),
|
X = ClampToPlayfield(EffectiveX + Path.PositionAt(e.PathProgress).X),
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -114,16 +114,16 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
|
||||||
{
|
{
|
||||||
Samples = this.GetNodeSamples(nodeIndex++),
|
Samples = this.GetNodeSamples(nodeIndex++),
|
||||||
StartTime = e.Time,
|
StartTime = e.Time,
|
||||||
X = ClampToPlayField(EffectiveX + Path.PositionAt(e.PathProgress).X),
|
X = ClampToPlayfield(EffectiveX + Path.PositionAt(e.PathProgress).X),
|
||||||
});
|
});
|
||||||
break;
|
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]
|
[JsonIgnore]
|
||||||
public double Duration
|
public double Duration
|
||||||
|
|
Loading…
Reference in New Issue