mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:52:57 +08:00
Simplify gravity.
This commit is contained in:
parent
a4cd409835
commit
c7dcb54d45
@ -46,18 +46,13 @@ namespace osu.Game.Rulesets.Mania.Timing.Drawables
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The acceleration due to "gravity" of the content of this container.
|
/// The acceleration due to "gravity" of the content of this container.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private double acceleration => timeSpan / travelTime / travelTime;
|
private double acceleration => 1 / timeSpan;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The travel time, after beat length adjustments.
|
|
||||||
/// </summary>
|
|
||||||
private double travelTime => timeSpan / TimingChange.SpeedMultiplier;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Computes the current time relative to <paramref name="time"/>, accounting for <see cref="travelTime"/>.
|
/// Computes the current time relative to <paramref name="time"/>, accounting for <see cref="travelTime"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="time">The non-offset time.</param>
|
/// <param name="time">The non-offset time.</param>
|
||||||
/// <returns>The current time relative to <paramref name="time"/> - <see cref="travelTime"/>. </returns>
|
/// <returns>The current time relative to <paramref name="time"/> - <see cref="travelTime"/>. </returns>
|
||||||
private double relativeTimeAt(double time) => Time.Current - time + travelTime;
|
private double relativeTimeAt(double time) => Time.Current - time + timeSpan;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user