29b4d1ed31a2914df12ad9f2f24b9c5f514b6a50.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, BaseExp, uiMgr, Constants, Game, _dec, _class, _crd, ccclass, property, PauseUI;
  4. function _reportPossibleCrUseOfBaseExp(extras) {
  5. _reporterNs.report("BaseExp", "../core/base/BaseExp", _context.meta, extras);
  6. }
  7. function _reportPossibleCrUseOfuiMgr(extras) {
  8. _reporterNs.report("uiMgr", "../core/manager/UIManager", _context.meta, extras);
  9. }
  10. function _reportPossibleCrUseOfConstants(extras) {
  11. _reporterNs.report("Constants", "../data/Constants", _context.meta, extras);
  12. }
  13. function _reportPossibleCrUseOfGame(extras) {
  14. _reporterNs.report("Game", "../game/Game", _context.meta, extras);
  15. }
  16. return {
  17. setters: [function (_unresolved_) {
  18. _reporterNs = _unresolved_;
  19. }, function (_cc) {
  20. _cclegacy = _cc.cclegacy;
  21. __checkObsolete__ = _cc.__checkObsolete__;
  22. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  23. _decorator = _cc._decorator;
  24. }, function (_unresolved_2) {
  25. BaseExp = _unresolved_2.BaseExp;
  26. }, function (_unresolved_3) {
  27. uiMgr = _unresolved_3.uiMgr;
  28. }, function (_unresolved_4) {
  29. Constants = _unresolved_4.Constants;
  30. }, function (_unresolved_5) {
  31. Game = _unresolved_5.Game;
  32. }],
  33. execute: function () {
  34. _crd = true;
  35. _cclegacy._RF.push({}, "e8219vIPUdJ9rtMj9UeInkN", "PauseUI", undefined);
  36. __checkObsolete__(['_decorator', 'EventTouch']);
  37. ({
  38. ccclass,
  39. property
  40. } = _decorator); //暂停游戏
  41. _export("PauseUI", PauseUI = (_dec = ccclass('PauseUI'), _dec(_class = class PauseUI extends (_crd && BaseExp === void 0 ? (_reportPossibleCrUseOfBaseExp({
  42. error: Error()
  43. }), BaseExp) : BaseExp) {
  44. show() {
  45. this.hasAnim = true;
  46. this.closeOnBlank = false;
  47. (_crd && Game === void 0 ? (_reportPossibleCrUseOfGame({
  48. error: Error()
  49. }), Game) : Game).I.isPause = true;
  50. }
  51. /**
  52. * 按钮点击事件
  53. * @param event 事件
  54. * @param param 参数
  55. */
  56. onBtnClicked(event, customEventData) {
  57. super.onBtnClicked(event, customEventData);
  58. var btnName = event.target.name;
  59. if (btnName === 'back_main_btn') {
  60. //返回首页
  61. (_crd && Game === void 0 ? (_reportPossibleCrUseOfGame({
  62. error: Error()
  63. }), Game) : Game).I.isGameOver = true;
  64. (_crd && uiMgr === void 0 ? (_reportPossibleCrUseOfuiMgr({
  65. error: Error()
  66. }), uiMgr) : uiMgr).pop((_crd && Constants === void 0 ? (_reportPossibleCrUseOfConstants({
  67. error: Error()
  68. }), Constants) : Constants).mainUIs.main);
  69. } else if (btnName === 'continue_btn') {
  70. (_crd && uiMgr === void 0 ? (_reportPossibleCrUseOfuiMgr({
  71. error: Error()
  72. }), uiMgr) : uiMgr).hide((_crd && Constants === void 0 ? (_reportPossibleCrUseOfConstants({
  73. error: Error()
  74. }), Constants) : Constants).popUIs.pauseUI, () => {
  75. (_crd && Game === void 0 ? (_reportPossibleCrUseOfGame({
  76. error: Error()
  77. }), Game) : Game).I.isPause = false;
  78. });
  79. }
  80. }
  81. }) || _class));
  82. _cclegacy._RF.pop();
  83. _crd = false;
  84. }
  85. };
  86. });
  87. //# sourceMappingURL=29b4d1ed31a2914df12ad9f2f24b9c5f514b6a50.js.map