mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 21:03:21 +08:00
Update hit object result when lifetime is end
This commit is contained in:
parent
504e79b968
commit
8955d5de04
@ -220,6 +220,16 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
OnNewResult?.Invoke(this, Result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Should be called at least once after lifetime of this hit object is end.
|
||||
/// </summary>
|
||||
public void OnLifetimeEnd()
|
||||
{
|
||||
foreach (var nested in NestedHitObjects)
|
||||
nested.OnLifetimeEnd();
|
||||
UpdateResult(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes this <see cref="DrawableHitObject"/>, checking if a scoring result has occurred.
|
||||
/// </summary>
|
||||
|
@ -31,5 +31,11 @@ namespace osu.Game.Rulesets.UI
|
||||
int i = yObj.HitObject.StartTime.CompareTo(xObj.HitObject.StartTime);
|
||||
return i == 0 ? CompareReverseChildID(x, y) : i;
|
||||
}
|
||||
|
||||
protected override void OnChildLifetimeBoundaryCrossed(LifetimeBoundaryCrossedEvent e)
|
||||
{
|
||||
if (e.Kind == LifetimeBoundaryKind.End && e.Direction == LifetimeBoundaryCrossingDirection.Forward && e.Child is DrawableHitObject hitObject)
|
||||
hitObject.OnLifetimeEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user