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; } }
// Update is called once per frame void Update() { // Replace with stepping on tiles later on if (Input.GetKeyDown(KeyCode.Q) && !quizOpen) { if (api) // Checks if the api is present. { api.MakeRequest( new Action <Response>((Response response) => { question = response.results; Quiz(); }) ); } instance = this; } }
// Update is called once per frame void Update() { // Replace with stepping on tiles later on instance = this; if (GridManager.requestQuestion && !quizOpen) { busy = true; GridManager.requestQuestion = false; if (api) // Checks if the api is present. { api.MakeRequest( new Action <Response>((Response response) => { question = response.results; Quiz(); }) ); } else { } } }
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; }