Fix level text on mobile

This commit is contained in:
2026-02-08 02:02:43 -07:00
parent e5df1f450f
commit c8375fdcc1

View File

@@ -677,7 +677,7 @@ public class GamePlayer : MonoBehaviour
if (DiscordRPCHandler.Instance != null) if (DiscordRPCHandler.Instance != null)
DiscordRPCHandler.Instance.UpdateRPC("Playing in normal mode", $"Score: {Tools.FormatWithCommas(score)} | High Score: {Tools.FormatWithCommas(highscore)}"); DiscordRPCHandler.Instance.UpdateRPC("Playing in normal mode", $"Score: {Tools.FormatWithCommas(score)} | High Score: {Tools.FormatWithCommas(highscore)}");
var (_, level, currentXpInLevel, totalXpForLevel, percentDone) = Tools.GetLevelInfo(); var (_, level, currentXpInLevel, totalXpForLevel, percentDone) = Tools.GetLevelInfo();
levelText.text = $"Level: {level}\nXP: {currentXpInLevel}/{totalXpForLevel} ({Math.Floor(percentDone)}%)"; levelText.text = $"Level: {level}" + (Application.isMobilePlatform ? " \\u2022 " : "\n") + $"XP: {currentXpInLevel}/{totalXpForLevel} ({Math.Floor(percentDone)}%)";
} }
void CheckIfGrounded() void CheckIfGrounded()