VuforialHint.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /****************************
  2. summary:
  3. ****************************/
  4. using QFramework;
  5. using System.Collections;
  6. using System.Collections.Generic;
  7. using UnityEngine;
  8. using UnityEngine.UI;
  9. public class VuforialHint : MonoSingleton<VuforialHint>
  10. {
  11. public GameObject vuforiaHint;
  12. public Text text;
  13. public GameObject SZGBox;
  14. private int num = 0;
  15. private float time;
  16. private void FixedUpdate()
  17. {
  18. time += Time.deltaTime;
  19. num = (int)time;
  20. switch (num%4)
  21. {
  22. case 0:
  23. text.text = "等待扫描图片";
  24. break;
  25. case 1:
  26. text.text = "等待扫描图片.";
  27. break;
  28. case 2:
  29. text.text = "等待扫描图片..";
  30. break;
  31. case 3:
  32. text.text = "等待扫描图片...";
  33. break;
  34. default:
  35. break;
  36. }
  37. }
  38. public void Show()
  39. {
  40. vuforiaHint.SetActive(true);
  41. }
  42. public void Close()
  43. {
  44. vuforiaHint.SetActive(false);
  45. SZGBox.SetActive(true);
  46. }
  47. }