From 38289b8a9fba0d843413fc074e32a2e961ca6e08 Mon Sep 17 00:00:00 2001 From: Mingu Kim Date: Sat, 1 Mar 2025 21:54:37 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8A=A4=ED=8F=AC=EB=84=88=2010=EC=8A=A4?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EC=A7=80=20=EC=9D=B4=ED=9B=84=20=EC=B9=B4?= =?UTF-8?q?=EC=9A=B4=ED=8A=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Gameton/Scripts/Monster/MonsterSpawner.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterSpawner.cs b/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterSpawner.cs index 4a4b7b9d..d519c2b0 100644 --- a/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterSpawner.cs +++ b/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterSpawner.cs @@ -89,7 +89,7 @@ namespace TON activeMonsters.RemoveAll(monster => monster == null); // 모든 몬스터가 죽었는지 확인하고 다음 웨이브 준비 - if (activeMonsters.Count == 0 && currentWave > 0 && currentWave < 11 && !isWaitingForNextWave) + if (activeMonsters.Count == 0 && currentWave > 0 && !isWaitingForNextWave) { isWaitingForNextWave = true; StartCoroutine(StartNextWaveWithDelay()); @@ -264,10 +264,15 @@ namespace TON private IEnumerator StartNextWaveWithDelay() { - if (currentWave != 11 && GameObject.Find("TON.Player").GetComponentInChildren() != null) + // 웨이브가 10이면 (즉, 10스테이지가 끝났으면) 또는 웨이브가 11이면 게임 종료 UI를 바로 보여줌 + if (currentWave == 10 || currentWave == 11 || GameObject.Find("TON.Player").GetComponentInChildren() == null) + { + Invoke(nameof(ShowGameEndUI), 0.5f); + } + else { SoundManager.instance.BgSoundPlay(null); - + float timer = nextWaveDelay; while (timer > 0) @@ -277,16 +282,11 @@ namespace TON yield return null; } - // waveCounter.text = "0"; waveCounter.text = null; isWaitingForNextWave = false; StartNextWave(); } - else - { - Invoke(nameof(ShowGameEndUI), 0.5f); - } } private void ShowGameEndUI()