public void loseHearts() { if (numHearts == 0) { PowerUps.sqIsActive = false; QuizOpen.GetInstance().Resume(); SceneManager.LoadScene("GameOver"); } numHearts--; }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Escape) && (QuizOpen.GetInstance().isOpen() == false)) { if (GameIsPaused) { Resume(); } else { PauseGame(); } } }
public IEnumerator SetTimer() { tText(); while ((running == false) && (active == true) && (timeLeft > 0)) { running = true; yield return(new WaitForSeconds(1)); timeLeft--; if (timeLeft == 0) { QuizOpen.GetInstance().Resume(); SceneManager.LoadScene("GameOver"); } running = false; } }
public void GameEnd() { QuizOpen.GetInstance().Resume(); SceneManager.LoadScene("GameOver"); }
private void Update() { active = QuizOpen.GetInstance().isOpen() ? true : false; StartCoroutine(SetTimer()); }
public void Select() { QuizOpen.GetInstance().Answer(this); }
public void UseSQ() { QuizOpen.GetInstance().Resume(); pUp1.gameObject.SetActive(false); sqIsActive = false; }