Mini-Games-Game/Assets/Scripts/Timer.cs
2024-06-24 23:53:55 +01:00

25 lines
540 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
//* General Comments or Finished Tasks
//TODO Tasks left to be done for game
//! Bugs or Issues
//? Questions or Suggestions
public class Timer : MonoBehaviour
{
public float timeRemaining;
public TextMeshProUGUI timeText;
//* Universal game timer
void Update()
{
if (timeRemaining > 0)
{
timeRemaining -= Time.deltaTime;
timeText.text = timeRemaining.ToString("F0");
}
}
}