Exemple #1
0
 public void AnswerQuestion(float correctness)
 {
     questionNumber++;
     header.SetTextPure("Q." + questionNumber);
     NextQuestion();
     Debug.Log("Answered question with correctness: " + correctness);
     this.IncrementScore((int)(correctness * 20));
     if (Mathf.Approximately(correctness, 1))
     {
         if (currentCatState == "Neutral")
         {
             this.SetCatState("Happy");
         }
         else if (currentCatState == "Sad")
         {
             this.SetCatState("Neutral");
         }
     }
     else if (Mathf.Approximately(correctness, 0))
     {
         if (currentCatState == "Neutral")
         {
             this.SetCatState("Sad");
         }
         else if (currentCatState == "Happy")
         {
             this.SetCatState("Neutral");
         }
     }
 }
Exemple #2
0
 public virtual void Fill(Question question)
 {
     optionAText.SetTextPure(FormatFood(question.foodA));
     optionBText.SetTextPure(FormatFood(question.foodB));
     optionAImg.UpdatePicture(question.foodA.image);
     optionBImg.UpdatePicture(question.foodB.image);
     clicked = false;
 }