mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:33:20 +08:00
Rename ClampToPlayField
This commit is contained in:
parent
cc21e42e35
commit
86a09ad2cf
@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
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 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
{
|
{
|
||||||
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 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
{
|
{
|
||||||
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
Block a user