9223b50b0b25e34c00abbd1136311e176203d399.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, ui_base, GameUILayers, gui, ModuleDef, Layout_Lock, ani_ui, UI_Main, _dec, _class, _crd, ccclass, property, UI_Lock;
  4. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
  5. function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
  6. function _reportPossibleCrUseOfui_base(extras) {
  7. _reporterNs.report("ui_base", "../../../core/ui/ui_base", _context.meta, extras);
  8. }
  9. function _reportPossibleCrUseOfGameUILayers(extras) {
  10. _reporterNs.report("GameUILayers", "../../../core/ui/ui", _context.meta, extras);
  11. }
  12. function _reportPossibleCrUseOfgui(extras) {
  13. _reporterNs.report("gui", "../../../core/ui/ui", _context.meta, extras);
  14. }
  15. function _reportPossibleCrUseOfModuleDef(extras) {
  16. _reporterNs.report("ModuleDef", "../../../Scripts/ModuleDef", _context.meta, extras);
  17. }
  18. function _reportPossibleCrUseOfLayout_Lock(extras) {
  19. _reporterNs.report("Layout_Lock", "./Layout_Lock", _context.meta, extras);
  20. }
  21. function _reportPossibleCrUseOfani_ui(extras) {
  22. _reporterNs.report("ani_ui", "../UI_Main/UI_Main", _context.meta, extras);
  23. }
  24. function _reportPossibleCrUseOfUI_Main(extras) {
  25. _reporterNs.report("UI_Main", "../UI_Main/UI_Main", _context.meta, extras);
  26. }
  27. function _reportPossibleCrUseOfLayout_Main(extras) {
  28. _reporterNs.report("Layout_Main", "../UI_Main/Layout_Main", _context.meta, extras);
  29. }
  30. return {
  31. setters: [function (_unresolved_) {
  32. _reporterNs = _unresolved_;
  33. }, function (_cc) {
  34. _cclegacy = _cc.cclegacy;
  35. __checkObsolete__ = _cc.__checkObsolete__;
  36. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  37. _decorator = _cc._decorator;
  38. }, function (_unresolved_2) {
  39. ui_base = _unresolved_2.default;
  40. }, function (_unresolved_3) {
  41. GameUILayers = _unresolved_3.GameUILayers;
  42. gui = _unresolved_3.gui;
  43. }, function (_unresolved_4) {
  44. ModuleDef = _unresolved_4.ModuleDef;
  45. }, function (_unresolved_5) {
  46. Layout_Lock = _unresolved_5.Layout_Lock;
  47. }, function (_unresolved_6) {
  48. ani_ui = _unresolved_6.ani_ui;
  49. UI_Main = _unresolved_6.UI_Main;
  50. }],
  51. execute: function () {
  52. _crd = true;
  53. _cclegacy._RF.push({}, "8fb82Ol44hAxperkef41f5v", "UI_Lock", undefined);
  54. __checkObsolete__(['_decorator', 'Component', 'Node', 'UI']);
  55. ({
  56. ccclass,
  57. property
  58. } = _decorator);
  59. _export("UI_Lock", UI_Lock = (_dec = ccclass('UI_Lock'), _dec(_class = class UI_Lock extends (_crd && ui_base === void 0 ? (_reportPossibleCrUseOfui_base({
  60. error: Error()
  61. }), ui_base) : ui_base) {
  62. constructor() {
  63. super((_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
  64. error: Error()
  65. }), ModuleDef) : ModuleDef).GAME, 'ui/UI_Lock/Lock', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
  66. error: Error()
  67. }), GameUILayers) : GameUILayers).HUD, _crd && Layout_Lock === void 0 ? (_reportPossibleCrUseOfLayout_Lock({
  68. error: Error()
  69. }), Layout_Lock) : Layout_Lock);
  70. }
  71. onCreated() {
  72. var _this = this;
  73. return _asyncToGenerator(function* () {
  74. var layout = _this.getLayout();
  75. (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({
  76. error: Error()
  77. }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent);
  78. var main_layout = (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  79. error: Error()
  80. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  81. error: Error()
  82. }), UI_Main) : UI_Main).getLayout();
  83. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  84. error: Error()
  85. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  86. error: Error()
  87. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  88. error: Error()
  89. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  90. error: Error()
  91. }), UI_Main) : UI_Main).evt.key.pause);
  92. _this.onButtonEvent(layout.Close_Btn, () => {
  93. //关闭设置界面
  94. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  95. error: Error()
  96. }), gui) : gui).close(UI_Lock);
  97. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  98. error: Error()
  99. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  100. error: Error()
  101. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  102. error: Error()
  103. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  104. error: Error()
  105. }), UI_Main) : UI_Main).evt.key.resume);
  106. }, _this);
  107. _this.onButtonEvent(layout.Ensure_Btn, /*#__PURE__*/_asyncToGenerator(function* () {
  108. var ret = yield chsdk.playRewardAd('解锁槽位');
  109. if (ret) {
  110. //场景中的quad消失
  111. for (var i = 0; i < 2; i++) {
  112. if (main_layout.Container.Lock_node[i].active) {
  113. main_layout.Container.Lock_node[i].active = false;
  114. main_layout.Container.unlock_Num += 1;
  115. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  116. error: Error()
  117. }), gui) : gui).close(UI_Lock);
  118. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  119. error: Error()
  120. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  121. error: Error()
  122. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  123. error: Error()
  124. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  125. error: Error()
  126. }), UI_Main) : UI_Main).evt.key.resume);
  127. return;
  128. }
  129. }
  130. }
  131. }), _this);
  132. })();
  133. }
  134. }) || _class));
  135. _cclegacy._RF.pop();
  136. _crd = false;
  137. }
  138. };
  139. });
  140. //# sourceMappingURL=9223b50b0b25e34c00abbd1136311e176203d399.js.map