NewQuestion.cs 771 B

123456789101112131415161718192021222324252627
  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. public Vector3 originalPos;
  7. public Quaternion originalRot;
  8. void Start()
  9. {
  10. // Get question from server
  11. originalPos = this.transform.position;
  12. originalRot = this.transform.rotation;
  13. }
  14. private static NewQuestion instance;
  15. public static NewQuestion Instance() {
  16. if (!instance) {
  17. instance = FindObjectOfType(typeof(NewQuestion)) as NewQuestion;
  18. if (!instance) {
  19. Debug.Log("There need to be at least one active GenericDialog on the screen");
  20. }
  21. }
  22. return instance;
  23. }
  24. }