From 2dea9a4d728ace09c92e04abc7fc5acb42556fa1 Mon Sep 17 00:00:00 2001 From: djkellerman Date: Tue, 25 Mar 2025 11:34:24 -0400 Subject: [PATCH] timer additions --- Assets/Scenes/Platformer With Headroom.unity | 3 ++- Assets/Scripts/GameTimer.cs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/Scenes/Platformer With Headroom.unity b/Assets/Scenes/Platformer With Headroom.unity index 881f5cd..8ef32e2 100644 --- a/Assets/Scenes/Platformer With Headroom.unity +++ b/Assets/Scenes/Platformer With Headroom.unity @@ -711,6 +711,7 @@ MonoBehaviour: m_EditorClassIdentifier: startTime: 180 timerText: {fileID: 0} + timer: {fileID: 0} --- !u!114 &778700334 MonoBehaviour: m_ObjectHideFlags: 0 @@ -731,7 +732,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: + m_text: test m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} diff --git a/Assets/Scripts/GameTimer.cs b/Assets/Scripts/GameTimer.cs index 1011960..1719063 100644 --- a/Assets/Scripts/GameTimer.cs +++ b/Assets/Scripts/GameTimer.cs @@ -1,3 +1,4 @@ +using TMPro; using UnityEngine; using UnityEngine.UI; @@ -8,10 +9,12 @@ public class GameTimer : MonoBehaviour private bool timerRunning = false; public Text timerText; + [SerializeField] private TextMeshProUGUI timer; private void Start() { timeRemaining = startTime; + timer.text = "0:00.00"; UpdateTimerDisplay(); }