public void Update() { any = Enemiesalive; if (Enemiesalive > 0) { return; } if (countdown < 0) { StartCoroutine(SpawnWave()); StartCoroutine(SpawnWave2()); StartCoroutine(SpawnWave3()); countdown = timeBetweenWave; return; } if (waveIndex == waves.Length && Enemiesalive <= 0) { //gameManager.WinLevel(); SceneFader.FadTo("Win"); } countdown -= Time.deltaTime; CountDownTimer.text = Mathf.Round(countdown).ToString(); }
public void Update() { Base.text = baseHealth.ToString() + " / " + health.ToString(); if (baseHealth <= 0 && !Lost) { //SceneManager.LoadScene("Lose"); SceneFader.FadTo("Lose"); Lost = true; } }
IEnumerator GameLoading() { yield return(new WaitForSeconds(9f)); SceneFader.FadTo("GameLevel"); }
public void ReturnMenu() { // SceneManager.LoadScene("Menu"); SceneFader.FadTo("Menu"); }
public void PlayGamelevel() { SceneFader.FadTo("LevelSelect"); }
IEnumerator CreditsPlayAnimation() { yield return(new WaitForSeconds(18.0f)); SceneFader.FadTo("Menu"); }
public void WinLevel() { PlayerPrefs.SetInt("LevelReached", leveltounlock); sceneFader.FadTo(nextlevel); }
public void PlayGamelevel() { //SceneManager.LoadScene("GameLevel"); SceneFader.FadTo("Loading"); }