1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Give hitobjects lifetimes

This commit is contained in:
smoogipoo 2018-01-05 15:48:19 +09:00
parent 1276e2c71a
commit d2b135d2a8

View File

@ -29,11 +29,22 @@ namespace osu.Game.Rulesets.UI.Scrolling
RelativeSizeAxes = Axes.Both;
}
protected override bool UpdateChildrenLife()
{
foreach (var obj in Objects)
{
obj.LifetimeStart = obj.HitObject.StartTime - TimeRange - 1000;
obj.LifetimeEnd = ((obj.HitObject as IHasEndTime)?.EndTime ?? obj.HitObject.StartTime + TimeRange) + 1000;
}
return base.UpdateChildrenLife();
}
protected override void UpdateAfterChildrenLife()
{
base.UpdateAfterChildrenLife();
// We need to calculate this as soon as possible so that hitobjects
// We need to calculate this as soon as possible after lifetimes so that hitobjects
// get the final say in their positions
var currentMultiplier = controlPointAt(Time.Current);