StaffRollMgr.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using System;
  2. using UnityEngine;
  3. public class StaffRollMgr : BaseCreatePanel
  4. {
  5. public BasePanelMgr.FadeState CurrentFadeState
  6. {
  7. get
  8. {
  9. return this.currentFadeState;
  10. }
  11. }
  12. public override void Init()
  13. {
  14. this.m_goPanel = base.GetPanel("StaffRollPanel");
  15. this.staffrollScroll.gameObject.SetActive(true);
  16. this.currentViewerType = StaffRollMgr.ViewerType.StaffRoll;
  17. this.m_api = new StaffRollAPI();
  18. base.SetDurationToFadeIn(2f);
  19. base.SetDurationToFadeOut(2f);
  20. }
  21. public void OpenStaffRollPanel()
  22. {
  23. this.m_api.SceneStart(this, new StaffRollAPI.dgOnSceneStartCallBack(this.OpenStaffRollCallBack));
  24. }
  25. private void OpenStaffRollCallBack()
  26. {
  27. base.BaseOpenPanel();
  28. }
  29. protected override void OpenPanel()
  30. {
  31. StaffRollMgr.ViewerType viewerType = this.currentViewerType;
  32. if (viewerType != StaffRollMgr.ViewerType.StaffRoll)
  33. {
  34. if (viewerType != StaffRollMgr.ViewerType.Logo)
  35. {
  36. }
  37. }
  38. }
  39. public void Finish()
  40. {
  41. this.m_api.EndNextScene(new StaffRollAPI.dgOnSceneFinalCallBack(this.sceneMgr.CloseScene));
  42. }
  43. public void CloseViewerAndPanel()
  44. {
  45. base.BaseClosePanel();
  46. }
  47. protected override void AfterClose()
  48. {
  49. }
  50. protected override void SetFadeTargetPanel()
  51. {
  52. this.fadeTargetPanel = this.m_goPanel;
  53. }
  54. private void Update()
  55. {
  56. if (this.staffrollScroll.Finish || Input.GetKeyUp(KeyCode.Return))
  57. {
  58. this.Finish();
  59. }
  60. }
  61. [SerializeField]
  62. private StaffRollScroll staffrollScroll;
  63. private StaffRollAPI m_api;
  64. private StaffRollMgr.ViewerType currentViewerType;
  65. private const int LeftClick = 0;
  66. private enum ViewerType
  67. {
  68. None,
  69. StaffRoll,
  70. Logo
  71. }
  72. }