GuidePanel_Mobile.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using TMPro;
  4. using UnityEngine;
  5. using UnityEngine.UI;
  6. public class GuidePanel_Mobile : BasePanel
  7. {
  8. public Button return_Button;
  9. public TextMeshPro HashText;
  10. private void Awake()
  11. {
  12. return_Button.onClick.AddListener(() =>
  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_Mobile);
  27. StepManager.isFaceBuidling = false;
  28. await UIManager.Instance.ShowUI(WindowID.MobilePanel);
  29. await UIManager.Instance.ShowUI(WindowID.MainPanel);
  30. }
  31. public override void OnCloseWindow()
  32. {
  33. }
  34. public override void OnDestroyWindow()
  35. {
  36. }
  37. public override void OnInitWindow()
  38. {
  39. UIManager.Instance.HideUI(WindowID.MobilePanel);
  40. UIManager.Instance.HideUI(WindowID.MainPanel);
  41. StepManager.isFaceBuidling = true;
  42. }
  43. public override void OnShowWindow()
  44. {
  45. //HashText.text = "ID: " + StepManager.userID;
  46. UIManager.Instance.HideUI(WindowID.MobilePanel);
  47. UIManager.Instance.HideUI(WindowID.MainPanel);
  48. StepManager.isFaceBuidling = true;
  49. }
  50. }