Ejemplo n.º 1
0
    public void CheckIfTrue()
    {
        int    option1;
        int    option2;
        int    answer;
        string trueAnswer = Answer.GetComponent <Text>().text;

        if (trueAnswer != GetComponent <Text>().text)
        {
            instance.LooseAStar();
        }
        else
        {
            score.increaseScore();
        }
        questionNumber.increaseScore();
        int.TryParse(First1.GetComponent <Text>().text, out option1);
        int.TryParse(Second2.GetComponent <Text>().text, out option2);
        answer = option1 + option2;
        Answer.GetComponent <Text>().text = answer.ToString();
        Check();
    }
Ejemplo n.º 2
0
 public void falseAnswer()
 {
     instance.LooseAStar();
 }