timer additions
This commit is contained in:
@@ -711,6 +711,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
startTime: 180
|
startTime: 180
|
||||||
timerText: {fileID: 0}
|
timerText: {fileID: 0}
|
||||||
|
timer: {fileID: 0}
|
||||||
--- !u!114 &778700334
|
--- !u!114 &778700334
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -731,7 +732,7 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text:
|
m_text: test
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
@@ -8,10 +9,12 @@ public class GameTimer : MonoBehaviour
|
|||||||
private bool timerRunning = false;
|
private bool timerRunning = false;
|
||||||
|
|
||||||
public Text timerText;
|
public Text timerText;
|
||||||
|
[SerializeField] private TextMeshProUGUI timer;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
timeRemaining = startTime;
|
timeRemaining = startTime;
|
||||||
|
timer.text = "0:00.00";
|
||||||
UpdateTimerDisplay();
|
UpdateTimerDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user