NewQuestion.cs 824 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections;
  2. using UnityEngine;
  3. using UnityEngine.EventSystems;
  4. using UnityEngine.UI;
  5. public class NewQuestion : QuestionCard {
  6. // Start is called before the first frame update
  7. public Vector3 originalPos;
  8. public Quaternion originalRot;
  9. public Text CategoryText;
  10. void Start()
  11. {
  12. // Get question from server
  13. originalPos = this.transform.position;
  14. originalRot = this.transform.rotation;
  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. }