GuidePanel.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using TMPro;
  4. using UnityEngine;
  5. using UnityEngine.UI;
  6. public class GuidePanel : BasePanel
  7. {
  8. public Button return_Button;
  9. public TextMeshPro HashText;
  10. private void Awake()
  11. {
  12. return_Button.onClick.AddListener(async() =>
  13. {
  14. CloseGuide();
  15. });
  16. }
  17. private void Update()
  18. {
  19. if (Input.GetKey(KeyCode.Escape))
  20. {
  21. CloseGuide();
  22. }
  23. }
  24. async void CloseGuide()
  25. {
  26. UIManager.Instance.HideUI(WindowID.GuidePanel);
  27. StepManager.isFaceBuidling = false;
  28. await UIManager.Instance.ShowUI(WindowID.MainPanel);
  29. }
  30. public override void OnCloseWindow()
  31. {
  32. }
  33. public override void OnDestroyWindow()
  34. {
  35. }
  36. public override void OnInitWindow()
  37. {
  38. UIManager.Instance.HideUI(WindowID.MainPanel);
  39. StepManager.isFaceBuidling = true;
  40. }
  41. public override void OnShowWindow()
  42. {
  43. //HashText.text = "ID: " + StepManager.userID;
  44. UIManager.Instance.HideUI(WindowID.MainPanel);
  45. StepManager.isFaceBuidling = true;
  46. }
  47. }