mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 13:27:20 +08:00
Fix editor seek transform seeking too much
This commit is contained in:
parent
1ab609fa2f
commit
3956a0669a
@ -266,8 +266,15 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
public override string TargetMember => nameof(currentTime);
|
||||
|
||||
protected override void Apply(EditorClock clock, double time) =>
|
||||
clock.currentTime = Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
|
||||
protected override void Apply(EditorClock clock, double time) => clock.currentTime = valueAt(time);
|
||||
|
||||
private double valueAt(double time)
|
||||
{
|
||||
if (time < StartTime) return StartValue;
|
||||
if (time >= EndTime) return EndValue;
|
||||
|
||||
return Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
|
||||
}
|
||||
|
||||
protected override void ReadIntoStartValue(EditorClock clock) => StartValue = clock.currentTime;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user