From 7a86f34935f52bd86488f878d98877cd645e9900 Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Sat, 12 Jun 2021 21:18:12 -0400 Subject: Use string interpolation --- Assets/Scripts/Controllers/GameController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Controllers/GameController.cs b/Assets/Scripts/Controllers/GameController.cs index 7801e17..a3783bd 100644 --- a/Assets/Scripts/Controllers/GameController.cs +++ b/Assets/Scripts/Controllers/GameController.cs @@ -61,7 +61,7 @@ namespace Controllers enemyScoreText.text = $"{enemy.score}"; var remaining = TimeSpan.FromSeconds(timeLimit - (Time.time - startTime)); - timerText.text = string.Format("{0:00}:{1:00}", remaining.Minutes, remaining.Seconds); + timerText.text = $"{remaining.Minutes:00}:{remaining.Seconds:00}"; } public struct Player -- cgit v1.2.3-56-ge451