void Update() { if (!levelChanger.requestedLeave && Input.GetKeyDown(KeyCode.Escape)) { levelChanger.GoBackToMenu(); } if (screenFader.IsIdle() && Time.timeScale == 0 && !levelChanger.requestedLeave) { Time.timeScale = 1; } }
void Update() { if (screenFader.IsIdle()) { if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); } else if (Input.anyKeyDown) { GetComponent <LevelChanger>().StartGame(); } } }