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
1 changed files with 4 additions and 2 deletions

View File

@ -23,8 +23,10 @@ public void ComputeInitialStates(IEnumerable<DrawableHitObject> hitObjects, Scro
{
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)
{