diff options
author | Carson Katri <carson.katri@gmail.com> | 2021-06-12 21:18:12 -0400 |
---|---|---|
committer | Carson Katri <carson.katri@gmail.com> | 2021-06-12 21:18:12 -0400 |
commit | 7a86f34935f52bd86488f878d98877cd645e9900 (patch) | |
tree | a7933bb9a6225a471a78374583fc53e319089b92 | |
parent | ee765e26621f0a7530ad63d7ce698dc80166e358 (diff) | |
download | gmtk-gamejam-7a86f34935f52bd86488f878d98877cd645e9900.tar.gz gmtk-gamejam-7a86f34935f52bd86488f878d98877cd645e9900.tar.zst gmtk-gamejam-7a86f34935f52bd86488f878d98877cd645e9900.zip |
Use string interpolation
-rw-r--r-- | Assets/Scripts/Controllers/GameController.cs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |