NewQuestion.cs 879 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections;
  2. using UnityEngine;
  3. using UnityEngine.EventSystems;
  4. public class NewQuestion : QuestionCard {
  5. // Start is called before the first frame update
  6. void Start()
  7. {
  8. // Get question from server
  9. SetQuestionData();
  10. }
  11. public void SetQuestionData()
  12. {
  13. GetQuestion(false);
  14. SetAnswerText("???? - ????");
  15. // For testing only, remove when done
  16. SetQuestionText(GetQuestionText().text + " " + GetAnswerText().text);
  17. }
  18. private static NewQuestion instance;
  19. public static NewQuestion Instance() {
  20. if (!instance) {
  21. instance = FindObjectOfType(typeof(NewQuestion)) as NewQuestion;
  22. if (!instance) {
  23. Debug.Log("There need to be at least one active GenericDialog on the screen");
  24. }
  25. }
  26. return instance;
  27. }
  28. }