From a03c9a178fb5b5dcf8526b95cabbc8a14f1042b7 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sun, 31 Aug 2025 09:23:29 -0700 Subject: [PATCH] Fix edit ui on mobile weirdness --- Assets/Scripts/GamePlayer.cs | 4 ++-- Assets/Scripts/GamePlayerPauseMenu.cs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/GamePlayer.cs b/Assets/Scripts/GamePlayer.cs index f2249ad..d010f82 100644 --- a/Assets/Scripts/GamePlayer.cs +++ b/Assets/Scripts/GamePlayer.cs @@ -10,7 +10,7 @@ public class GamePlayer : MonoBehaviour public static GamePlayer instance; private readonly float spawnRate = 1f; private float nextSpawnTime; - private BigInteger score; + internal BigInteger score; private BigInteger attempts; private BigInteger highscore; private BigInteger totalNormalBerries; @@ -25,7 +25,7 @@ public class GamePlayer : MonoBehaviour private float slownessLeft; private float speedyLeft; private float screenWidth; - private bool isGrounded; + internal bool isGrounded; public TMP_Text scoreText; public TMP_Text highScoreText; public TMP_Text boostText; diff --git a/Assets/Scripts/GamePlayerPauseMenu.cs b/Assets/Scripts/GamePlayerPauseMenu.cs index 1862371..8451eb8 100644 --- a/Assets/Scripts/GamePlayerPauseMenu.cs +++ b/Assets/Scripts/GamePlayerPauseMenu.cs @@ -111,6 +111,8 @@ public class GamePlayerPauseMenu : MonoBehaviour jumpButton.interactable = !jumpDraggableUI.canDrag; rightButton.interactable = !rightDraggableUI.canDrag; leftButton.interactable = !leftDraggableUI.canDrag; + jumpButton.transform.GetChild(0).GetComponent().color = !jumpDraggableUI.canDrag ? GamePlayer.instance.isGrounded ? Color.white : Color.red : Color.white; + restartButton.interactable = GamePlayer.instance.score != 0; } } } \ No newline at end of file