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> protected override void OnAdd(DrawableHitObject drawableHitObject) => onAddRecursive(drawableHitObject);
/// Make this <see cref="DrawableHitObject"/> lifetime and layout computed in next update.
/// </summary> protected override void OnRemove(DrawableHitObject drawableHitObject) => onRemoveRecursive(drawableHitObject);
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 void onAddRecursive(DrawableHitObject hitObject) private void onAddRecursive(DrawableHitObject hitObject)
{ {
@ -171,8 +164,6 @@ namespace osu.Game.Rulesets.UI.Scrolling
onAddRecursive(nested); onAddRecursive(nested);
} }
protected override void OnAdd(DrawableHitObject drawableHitObject) => onAddRecursive(drawableHitObject);
private void onRemoveRecursive(DrawableHitObject hitObject) private void onRemoveRecursive(DrawableHitObject hitObject)
{ {
toComputeLifetime.Remove(hitObject); toComputeLifetime.Remove(hitObject);
@ -184,7 +175,16 @@ namespace osu.Game.Rulesets.UI.Scrolling
onRemoveRecursive(nested); 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; private float scrollLength;