First project upload

This commit is contained in:
Rohan
2026-06-26 22:41:39 +05:30
parent 7f6e734b16
commit 604c0c786a
4637 changed files with 4299718 additions and 489307 deletions

View File

@@ -0,0 +1,22 @@
using TMPro;
using UnityEngine;
public class TimerNew : MonoBehaviour
{
public TextMeshProUGUI timerText;
public float time = 120f; // 2 minutes
void Update()
{
if (time > 0)
{
time -= Time.deltaTime;
time = Mathf.Max(time, 0);
}
int minutes = Mathf.FloorToInt(time / 60);
int seconds = Mathf.FloorToInt(time % 60);
timerText.text = string.Format("{0:00}:{1:00}", minutes, seconds);
}
}