사망 시 사망 UI 출력

This commit is contained in:
2026-02-25 16:18:57 +09:00
parent 8fd6ab652b
commit 9fd45ec5e9
3 changed files with 58 additions and 6 deletions

View File

@@ -18,6 +18,25 @@ public class RespawnCountdownUI : MonoBehaviour
private double _endServerTime;
private float _duration;
private void Awake()
{
// 시작할 때는 UI 숨김 (root가 자신이 아닌 경우만)
if (root != null && root != gameObject)
{
root.SetActive(false);
}
else if (root == gameObject)
{
// root가 자신인 경우, 자식인 Panel을 사용
Transform panelTransform = transform.Find("Panel");
if (panelTransform != null)
{
root = panelTransform.gameObject;
root.SetActive(false);
}
}
}
// 외부에서 호출: 사망 시 UI 시작
public void Show(double respawnEndServerTime, float durationSeconds)
{