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

Avoid transform overhead on every frame

This commit is contained in:
Dean Herbert 2023-07-23 17:04:57 +09:00
parent 1a76f6441a
commit 3b47949ace

View File

@ -127,13 +127,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
losingBar.ResizeWidthTo(0, 400, Easing.OutQuint); losingBar.ResizeWidthTo(0, 400, Easing.OutQuint);
winningBar.ResizeWidthTo(Math.Min(0.4f, MathF.Pow(diff / 1500000f, 0.5f) / 2), 400, Easing.OutQuint); winningBar.ResizeWidthTo(Math.Min(0.4f, MathF.Pow(diff / 1500000f, 0.5f) / 2), 400, Easing.OutQuint);
if (diff == 0) scoreDiffText.Alpha = diff != 0 ? 1 : 0;
{
scoreDiffText.Hide();
return;
}
scoreDiffText.Show();
scoreDiffText.Current.Value = -diff; scoreDiffText.Current.Value = -diff;
scoreDiffText.Origin = score1.Value > score2.Value ? Anchor.TopLeft : Anchor.TopRight; scoreDiffText.Origin = score1.Value > score2.Value ? Anchor.TopLeft : Anchor.TopRight;
} }