10스테이지 완료 후 EndUI 활성화 기능 추가
This commit is contained in:
@@ -233,20 +233,32 @@ namespace TON
|
|||||||
|
|
||||||
private IEnumerator StartNextWaveWithDelay()
|
private IEnumerator StartNextWaveWithDelay()
|
||||||
{
|
{
|
||||||
float timer = nextWaveDelay;
|
if (currentWave != 11 && GameObject.Find("TON.Player").GetComponentInChildren<CharacterBase>() != null)
|
||||||
|
|
||||||
while (timer > 0)
|
|
||||||
{
|
{
|
||||||
waveCounter.text = Mathf.CeilToInt(timer).ToString(); // 남은 시간 표시
|
float timer = nextWaveDelay;
|
||||||
timer -= Time.deltaTime;
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// waveCounter.text = "0";
|
while (timer > 0)
|
||||||
waveCounter.text = null;
|
{
|
||||||
|
waveCounter.text = Mathf.CeilToInt(timer).ToString(); // 남은 시간 표시
|
||||||
isWaitingForNextWave = false;
|
timer -= Time.deltaTime;
|
||||||
StartNextWave();
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// waveCounter.text = "0";
|
||||||
|
waveCounter.text = null;
|
||||||
|
|
||||||
|
isWaitingForNextWave = false;
|
||||||
|
StartNextWave();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Invoke(nameof(ShowGameEndUI), 0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowGameEndUI()
|
||||||
|
{
|
||||||
|
UIManager.Show<GameWinUI>(UIList.GameWinUI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user