- GameOverUI: 게임 오버 화면 표시 - VictoryUI: 보스 처치 시 승리 화면 표시 - VictoryEffect: 슬로우 모션, 카메라 연출, 이펙트 재생 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
60 lines
1.6 KiB
C#
60 lines
1.6 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using TMPro;
|
|
|
|
namespace Colosseum.UI
|
|
{
|
|
/// <summary>
|
|
/// 게임 오버 UI 컨트롤러.
|
|
/// GameManager에 의해 활성화/비활성화됩니다.
|
|
/// </summary>
|
|
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");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 카운트다운 텍스트 업데이트
|
|
/// </summary>
|
|
public void UpdateCountdown(int seconds)
|
|
{
|
|
if (countdownText != null)
|
|
{
|
|
countdownText.text = $"Restarting in {seconds}...";
|
|
}
|
|
}
|
|
}
|
|
}
|