사망 시 사망 UI 출력
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user