1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Reduce allocations in HitObjectLifetimeEntry

This commit is contained in:
Andrei Zavatski 2024-02-25 18:02:42 +03:00
parent f948f8ee5c
commit c3fa97d062

View File

@ -41,7 +41,22 @@ namespace osu.Game.Rulesets.Objects
/// <summary>
/// Whether <see cref="HitObject"/> and all of its nested objects have been judged.
/// </summary>
public bool AllJudged => Judged && NestedEntries.All(h => h.AllJudged);
public bool AllJudged
{
get
{
if (!Judged)
return false;
foreach (var entry in NestedEntries)
{
if (!entry.AllJudged)
return false;
}
return true;
}
}
private readonly IBindable<double> startTimeBindable = new BindableDouble();