public IEnumerator GameWon_cr() { SFXMan.StopSong(); SFXMan.sfx_CardWaveCleared.Play(); CardSceneGui.DisplayGuiMessage("Wave cleared! ", Color.white); gameState = GameState.GameWon; MainGame.Wave++; yield return(new WaitForSeconds(4)); StartCoroutine(InitiateWave_cr()); }
public IEnumerator GameLost_cr() { if (dangerState != DangerState.GameOver) { SFXMan.StopSong(); gameState = GameState.GameLost; CardMan.CardCascade(); SFXMan.sfx_GameOver.Play(); dangerState = DangerState.GameOver; yield return(new WaitForSeconds(3)); StartCoroutine(InitiateWave_cr()); SceneManager.LoadScene("MainMenu"); } }