MovieWindow.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.IO;
  4. public class MovieWindow : MonoBehaviour {
  5. private GameObject mMoviePanel = null;
  6. private GameObject mCloseButton = null;
  7. public void Init()
  8. {
  9. // LogHelper.Log(GameCfg._LocalSettingsPath);
  10. if (!File.Exists(Const.LocalConfigFileName)) // 未创建本地配置文件代表游戏第一次运行, 播放电影 -wg 2019年10月24日13:57:29
  11. {
  12. GameCfg._InitLocalSettigs();
  13. mMoviePanel = transform.Find("Movie").gameObject;
  14. mMoviePanel.SetActive(true);
  15. mCloseButton = mMoviePanel.transform.Find("CloseButton").gameObject;
  16. EventTriggerListener.Get(mCloseButton).onClick = OnClickPanel;
  17. }
  18. else
  19. {
  20. PanelHelper.Instance.ShowPanel("UI_NewLoginWindow",(ab) =>
  21. {
  22. });
  23. }
  24. // EventTriggerListener.Get(mMoviePanel).onClick = OnClickPanel;
  25. // GameObject.Find("UI_SplashWindow").SetActive(false);
  26. }
  27. // Update is called once per frame
  28. void Update () {
  29. }
  30. private void OnClickPanel(GameObject go)
  31. {
  32. PanelHelper.Instance.ShowPanel("UI_NewLoginWindow", (ab) =>
  33. {
  34. //// 关闭Loading
  35. mMoviePanel.SetActive(false);
  36. //PanelHelper.Instance.ShowPanel("UI_NoticeWindow", null, null, false, true, (ac) =>
  37. //{
  38. //});
  39. });
  40. }
  41. }