2026-04-20 카트 잡기

This commit is contained in:
2026-04-20 18:06:26 +09:00
parent 43899e355f
commit 1feebc9a85
29 changed files with 699 additions and 7 deletions

View File

@@ -0,0 +1,34 @@
using TMPro;
using UnityEngine;
namespace VRShopping.UI
{
public class GameTimerHud : MonoBehaviour
{
[SerializeField] private GameTimer _timer;
[SerializeField] private TMP_Text _text;
private void OnEnable()
{
if (_timer == null) return;
_timer.OnTick += HandleTick;
HandleTick(_timer.Remaining);
}
private void OnDisable()
{
if (_timer == null) return;
_timer.OnTick -= HandleTick;
}
private void HandleTick(float remaining)
{
if (_text == null) return;
int total = Mathf.CeilToInt(remaining);
int minutes = total / 60;
int seconds = total % 60;
_text.text = $"{minutes:00}:{seconds:00}";
}
}
}