Beispiel #1
0
 public void loseHearts()
 {
     if (numHearts == 0)
     {
         PowerUps.sqIsActive = false;
         QuizOpen.GetInstance().Resume();
         SceneManager.LoadScene("GameOver");
     }
     numHearts--;
 }
Beispiel #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape) && (QuizOpen.GetInstance().isOpen() == false))
     {
         if (GameIsPaused)
         {
             Resume();
         }
         else
         {
             PauseGame();
         }
     }
 }
Beispiel #3
0
    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;
        }
    }
Beispiel #4
0
 public void GameEnd()
 {
     QuizOpen.GetInstance().Resume();
     SceneManager.LoadScene("GameOver");
 }
Beispiel #5
0
 private void Update()
 {
     active = QuizOpen.GetInstance().isOpen() ? true : false;
     StartCoroutine(SetTimer());
 }
Beispiel #6
0
 public void Select()
 {
     QuizOpen.GetInstance().Answer(this);
 }
Beispiel #7
0
 public void UseSQ()
 {
     QuizOpen.GetInstance().Resume();
     pUp1.gameObject.SetActive(false);
     sqIsActive = false;
 }