From 3b47949ace8a36cea6ca364334421fc810b7ac60 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 23 Jul 2023 17:04:57 +0900 Subject: [PATCH] Avoid transform overhead on every frame --- .../Gameplay/Components/TournamentMatchScoreDisplay.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/osu.Game.Tournament/Screens/Gameplay/Components/TournamentMatchScoreDisplay.cs b/osu.Game.Tournament/Screens/Gameplay/Components/TournamentMatchScoreDisplay.cs index bc7886eb7e..e8a5396a37 100644 --- a/osu.Game.Tournament/Screens/Gameplay/Components/TournamentMatchScoreDisplay.cs +++ b/osu.Game.Tournament/Screens/Gameplay/Components/TournamentMatchScoreDisplay.cs @@ -127,13 +127,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components losingBar.ResizeWidthTo(0, 400, Easing.OutQuint); winningBar.ResizeWidthTo(Math.Min(0.4f, MathF.Pow(diff / 1500000f, 0.5f) / 2), 400, Easing.OutQuint); - if (diff == 0) - { - scoreDiffText.Hide(); - return; - } - - scoreDiffText.Show(); + scoreDiffText.Alpha = diff != 0 ? 1 : 0; scoreDiffText.Current.Value = -diff; scoreDiffText.Origin = score1.Value > score2.Value ? Anchor.TopLeft : Anchor.TopRight; }