IEnumerator LoadNextLevel() { yield return(new WaitForSeconds(2)); levelTransition.FadeToLevel("Level1"); // SceneManager.LoadScene("Level1"); }
void Update() { if (Input.GetKeyDown(KeyCode.E)) { canvas.GetComponent <Canvas>().enabled = true; counter = 1; //activated = true; } if (activated && Input.GetKeyDown(KeyCode.Q)) { counter++; } if (counter == 0) { chop.GetComponent <Image>().enabled = true; baba.GetComponent <Image>().enabled = false; dialog.text = "TO KONIEC! PRZESTAŃ!"; } else if (counter == 1) { chop.GetComponent <Image>().enabled = false; baba.GetComponent <Image>().enabled = true; dialog.text = "TO NIE JEST KONIEC, TO NAWET NIE JEST POCZĄTEK KOŃCA, TO DOPIERO KONIEC POCZĄTKU!"; } else if (counter == 2) { canvas.GetComponent <Canvas>().enabled = false; //Destroy(gameObject.FindWithTag("plague")); Destroy(plague); cdnText.SetActive(true); levelTransition.FadeToLevel("MainMenu"); } }
void OnTriggerEnter2D(Collider2D col) { levelTransition.FadeToLevel("Level2"); }
public void OnQuit() { Paused = false; LevelTransition.FadeToLevel(0); }
public void StartGame() { levelTransition.FadeToLevel("Level0"); }