TuSi.cs 872 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. using XRTool.Util;
  6. using XRTool.WorldUI;
  7. namespace ShadowStudio.UI
  8. {
  9. [RequireComponent(typeof(WorldDlg))]
  10. public class TuSi : UnitySingleton<TuSi>
  11. {
  12. private Text tusitext;
  13. protected override void Awake()
  14. {
  15. base.Awake();
  16. WorldDlg dlg = GetComponent<WorldDlg>();
  17. tusitext = dlg.GetBreadthChild<Text>("Tusitext");
  18. }
  19. // Start is called before the first frame update
  20. void Start()
  21. {
  22. }
  23. public void ShowTextContent(string content)
  24. {
  25. tusitext.text = content;
  26. Invoke("HeidTusi", 2f);
  27. }
  28. public void HeidTusi()
  29. {
  30. this.transform.gameObject.SetActive(false);
  31. }
  32. }
  33. }