using UnityEngine; using UnityEngine.UI; using TMPro; namespace Colosseum.UI { /// /// 게임 오버 UI 컨트롤러. /// GameManager에 의해 활성화/비활성화됩니다. /// public class GameOverUI : MonoBehaviour { [Header("UI References")] [Tooltip("게임 오버 텍스트")] [SerializeField] private TMP_Text gameOverText; [Tooltip("재시작 카운트다운 텍스트")] [SerializeField] private TMP_Text countdownText; [Tooltip("게임 오버 애니메이터")] [SerializeField] private Animator animator; [Header("Settings")] [Tooltip("게임 오버 텍스트")] [SerializeField] private string gameOverMessage = "GAME OVER"; [Tooltip("텍스트 색상")] [SerializeField] private Color textColor = Color.red; private void Start() { if (gameOverText != null) { gameOverText.text = gameOverMessage; gameOverText.color = textColor; } } private void OnEnable() { // 애니메이션 재생 if (animator != null) { animator.SetTrigger("Show"); } } /// /// 카운트다운 텍스트 업데이트 /// public void UpdateCountdown(int seconds) { if (countdownText != null) { countdownText.text = $"Restarting in {seconds}..."; } } } }