Beispiel #1
0
 public void Respond(int answer)
 {
     if (answer == questions[questionNumber].correctOption)
     {
         minigameController.AddPoints(3);
         correctDisplay.text = "Correct!";
         correctDisplay.GetComponent <Animator>().SetBool("Correct", true);
         StartCoroutine(NextQuestion());
     }
     else
     {
         minigameController.AddPoints(-1);
         correctDisplay.GetComponent <Animator>().SetBool("Correct", false);
         correctDisplay.text = "Incorrect!";
     }
     correctDisplay.GetComponent <Animator>().SetTrigger("Go");
 }
Beispiel #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag != "Player")
     {
         return;
     }
     minigameController.AddPoints(1);
     //other.GetComponentInParent<TopDown2DMovement>().thisPlayer.mingamePts++;
     Destroy(gameObject);
 }