1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00

Add some more commenting to lifetime calculation

This commit is contained in:
smoogipoo 2018-04-20 14:20:16 +09:00
parent f3fddcc82c
commit 52e3ffff30

View File

@ -23,8 +23,10 @@ namespace osu.Game.Rulesets.UI.Scrolling.Visualisers
{
foreach (var obj in hitObjects)
{
// For optimal lifetimes, the speed of the hitobject is factored into the time range
obj.LifetimeStart = obj.HitObject.StartTime - timeRange / controlPointAt(obj.HitObject.StartTime).Multiplier;
// The total amount of time that the hitobject will remain visible within the timeRange, which decreases as the speed multiplier increases
double visibleDuration = timeRange / controlPointAt(obj.HitObject.StartTime).Multiplier;
obj.LifetimeStart = obj.HitObject.StartTime - visibleDuration;
if (obj.HitObject is IHasEndTime endTime)
{