lap counter fix

This commit is contained in:
2024-04-26 13:31:31 +02:00
parent 8744c617fc
commit a9a1c44e75
3 changed files with 6 additions and 3 deletions

View File

@@ -81,8 +81,11 @@ public class GameManager : MonoBehaviour
if (checkpointsCollected == checkpoints.Count())
{
player.GetComponent<PlayerController>().checkpointsCollected = 0;
playerLaps[i] += 1;
lapCounter.text = "Lap count: " + playerLaps[i];
if (playerLaps[i] < lapAmount)
lapCounter.text = "Lap count: " + playerLaps[i];
}
string strTimes =playerTimes[i].ToString();