1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +08:00

More reordering of public vs private methods

This commit is contained in:
smoogipoo 2020-11-30 17:44:58 +09:00
parent 2745659986
commit 7ac2fba127

View File

@ -150,16 +150,9 @@ namespace osu.Game.Rulesets.UI.Scrolling
}
}
/// <summary>
/// Make this <see cref="DrawableHitObject"/> lifetime and layout computed in next update.
/// </summary>
private void invalidateHitObject(DrawableHitObject hitObject)
{
// Lifetime computation is delayed until next update because
// when the hit object is not pooled this container is not loaded here and `scrollLength` cannot be computed.
toComputeLifetime.Add(hitObject);
layoutComputed.Remove(hitObject);
}
protected override void OnAdd(DrawableHitObject drawableHitObject) => onAddRecursive(drawableHitObject);
protected override void OnRemove(DrawableHitObject drawableHitObject) => onRemoveRecursive(drawableHitObject);
private void onAddRecursive(DrawableHitObject hitObject)
{
@ -171,8 +164,6 @@ namespace osu.Game.Rulesets.UI.Scrolling
onAddRecursive(nested);
}
protected override void OnAdd(DrawableHitObject drawableHitObject) => onAddRecursive(drawableHitObject);
private void onRemoveRecursive(DrawableHitObject hitObject)
{
toComputeLifetime.Remove(hitObject);
@ -184,7 +175,16 @@ namespace osu.Game.Rulesets.UI.Scrolling
onRemoveRecursive(nested);
}
protected override void OnRemove(DrawableHitObject drawableHitObject) => onRemoveRecursive(drawableHitObject);
/// <summary>
/// Make this <see cref="DrawableHitObject"/> lifetime and layout computed in next update.
/// </summary>
private void invalidateHitObject(DrawableHitObject hitObject)
{
// Lifetime computation is delayed until next update because
// when the hit object is not pooled this container is not loaded here and `scrollLength` cannot be computed.
toComputeLifetime.Add(hitObject);
layoutComputed.Remove(hitObject);
}
private float scrollLength;