1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 05:32:54 +08:00

Split out score transform logic to method

This commit is contained in:
Bartłomiej Dach 2021-04-04 11:41:40 +02:00
parent 0febefd8eb
commit 5df27ce3d4

View File

@ -27,7 +27,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
showScore = value; showScore = value;
if (IsLoaded) if (IsLoaded)
score.FadeTo(value ? 1 : 0, 200); updateDisplay();
} }
} }
@ -108,7 +108,14 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
protected override void LoadComplete() protected override void LoadComplete()
{ {
base.LoadComplete(); base.LoadComplete();
score.Alpha = ShowScore ? 1 : 0;
updateDisplay();
FinishTransforms(true);
}
private void updateDisplay()
{
score.FadeTo(ShowScore ? 1 : 0, 200);
} }
} }
} }