NewQuestion.cs 753 B

1234567891011121314151617181920212223242526272829
  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. }
  16. private static NewQuestion instance;
  17. public static NewQuestion Instance() {
  18. if (!instance) {
  19. instance = FindObjectOfType(typeof(NewQuestion)) as NewQuestion;
  20. if (!instance) {
  21. Debug.Log("There need to be at least one active GenericDialog on the screen");
  22. }
  23. }
  24. return instance;
  25. }
  26. }