GuidePanel.cs 1.0 KB

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