mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 05:52:56 +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);
|
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>
|
/// <summary>
|
||||||
/// Processes this <see cref="DrawableHitObject"/>, checking if a scoring result has occurred.
|
/// Processes this <see cref="DrawableHitObject"/>, checking if a scoring result has occurred.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -31,5 +31,11 @@ namespace osu.Game.Rulesets.UI
|
|||||||
int i = yObj.HitObject.StartTime.CompareTo(xObj.HitObject.StartTime);
|
int i = yObj.HitObject.StartTime.CompareTo(xObj.HitObject.StartTime);
|
||||||
return i == 0 ? CompareReverseChildID(x, y) : i;
|
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