From 5fac0b6680e64316a2eec9426a9553124604d952 Mon Sep 17 00:00:00 2001 From: Mingu Kim Date: Fri, 28 Feb 2025 16:32:06 +0900 Subject: [PATCH] =?UTF-8?q?10=EC=8A=A4=ED=85=8C=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C=20=ED=9B=84=20EndUI=20=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Gameton/Scripts/Monster/MonsterSpawner.cs | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterSpawner.cs b/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterSpawner.cs index 2b611c06..d79d8065 100644 --- a/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterSpawner.cs +++ b/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterSpawner.cs @@ -233,20 +233,32 @@ namespace TON private IEnumerator StartNextWaveWithDelay() { - float timer = nextWaveDelay; - - while (timer > 0) + if (currentWave != 11 && GameObject.Find("TON.Player").GetComponentInChildren() != null) { - waveCounter.text = Mathf.CeilToInt(timer).ToString(); // 남은 시간 표시 - timer -= Time.deltaTime; - yield return null; - } + float timer = nextWaveDelay; - // waveCounter.text = "0"; - waveCounter.text = null; - - isWaitingForNextWave = false; - StartNextWave(); + while (timer > 0) + { + waveCounter.text = Mathf.CeilToInt(timer).ToString(); // 남은 시간 표시 + timer -= Time.deltaTime; + yield return null; + } + + // waveCounter.text = "0"; + waveCounter.text = null; + + isWaitingForNextWave = false; + StartNextWave(); + } + else + { + Invoke(nameof(ShowGameEndUI), 0.5f); + } + } + + private void ShowGameEndUI() + { + UIManager.Show(UIList.GameWinUI); } } -} +} \ No newline at end of file