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(); }
public void falseAnswer() { instance.LooseAStar(); }