timer additions
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user