mirror of
https://github.com/ppy/osu.git
synced 2025-02-28 21:33:22 +08:00
Give hitobjects lifetimes
This commit is contained in:
parent
1276e2c71a
commit
d2b135d2a8
@ -29,11 +29,22 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
|||||||
RelativeSizeAxes = Axes.Both;
|
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()
|
protected override void UpdateAfterChildrenLife()
|
||||||
{
|
{
|
||||||
base.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
|
// get the final say in their positions
|
||||||
|
|
||||||
var currentMultiplier = controlPointAt(Time.Current);
|
var currentMultiplier = controlPointAt(Time.Current);
|
||||||
|
Loading…
Reference in New Issue
Block a user