a6ae0a69e4239c886f230a6efc663ae5eb37a39d.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, ui_base, Layout_LatticeFull, GameUILayers, gui, ModuleDef, Hall, UI_Fail, ani_ui, UI_Main, _dec, _class, _crd, ccclass, property, UI_LatticeFull;
  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 _reportPossibleCrUseOfLayout_LatticeFull(extras) {
  10. _reporterNs.report("Layout_LatticeFull", "./Layout_LatticeFull", _context.meta, extras);
  11. }
  12. function _reportPossibleCrUseOfGameUILayers(extras) {
  13. _reporterNs.report("GameUILayers", "../../../core/ui/ui", _context.meta, extras);
  14. }
  15. function _reportPossibleCrUseOfgui(extras) {
  16. _reporterNs.report("gui", "../../../core/ui/ui", _context.meta, extras);
  17. }
  18. function _reportPossibleCrUseOfModuleDef(extras) {
  19. _reporterNs.report("ModuleDef", "../../../Scripts/ModuleDef", _context.meta, extras);
  20. }
  21. function _reportPossibleCrUseOfHall(extras) {
  22. _reporterNs.report("Hall", "../../hall/Hall", _context.meta, extras);
  23. }
  24. function _reportPossibleCrUseOfUI_Fail(extras) {
  25. _reporterNs.report("UI_Fail", "../UI_Fail/UI_Fail", _context.meta, extras);
  26. }
  27. function _reportPossibleCrUseOfani_ui(extras) {
  28. _reporterNs.report("ani_ui", "../UI_Main/UI_Main", _context.meta, extras);
  29. }
  30. function _reportPossibleCrUseOfUI_Main(extras) {
  31. _reporterNs.report("UI_Main", "../UI_Main/UI_Main", _context.meta, extras);
  32. }
  33. return {
  34. setters: [function (_unresolved_) {
  35. _reporterNs = _unresolved_;
  36. }, function (_cc) {
  37. _cclegacy = _cc.cclegacy;
  38. __checkObsolete__ = _cc.__checkObsolete__;
  39. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  40. _decorator = _cc._decorator;
  41. }, function (_unresolved_2) {
  42. ui_base = _unresolved_2.default;
  43. }, function (_unresolved_3) {
  44. Layout_LatticeFull = _unresolved_3.Layout_LatticeFull;
  45. }, function (_unresolved_4) {
  46. GameUILayers = _unresolved_4.GameUILayers;
  47. gui = _unresolved_4.gui;
  48. }, function (_unresolved_5) {
  49. ModuleDef = _unresolved_5.ModuleDef;
  50. }, function (_unresolved_6) {
  51. Hall = _unresolved_6.Hall;
  52. }, function (_unresolved_7) {
  53. UI_Fail = _unresolved_7.UI_Fail;
  54. }, function (_unresolved_8) {
  55. ani_ui = _unresolved_8.ani_ui;
  56. UI_Main = _unresolved_8.UI_Main;
  57. }],
  58. execute: function () {
  59. _crd = true;
  60. _cclegacy._RF.push({}, "eca24N6WDJOCKuYRcooOJCy", "UI_LatticeFull", undefined);
  61. __checkObsolete__(['_decorator', 'Component', 'Node']);
  62. ({
  63. ccclass,
  64. property
  65. } = _decorator);
  66. _export("UI_LatticeFull", UI_LatticeFull = (_dec = ccclass('UI_LatticeFull'), _dec(_class = class UI_LatticeFull extends (_crd && ui_base === void 0 ? (_reportPossibleCrUseOfui_base({
  67. error: Error()
  68. }), ui_base) : ui_base) {
  69. constructor() {
  70. super((_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
  71. error: Error()
  72. }), ModuleDef) : ModuleDef).GAME, 'ui/UI_LatticeFull/LatticeFull', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
  73. error: Error()
  74. }), GameUILayers) : GameUILayers).HUD, _crd && Layout_LatticeFull === void 0 ? (_reportPossibleCrUseOfLayout_LatticeFull({
  75. error: Error()
  76. }), Layout_LatticeFull) : Layout_LatticeFull);
  77. }
  78. onCreated() {
  79. var _this = this;
  80. return _asyncToGenerator(function* () {
  81. var layout = _this.getLayout();
  82. (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({
  83. error: Error()
  84. }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent);
  85. var num1 = (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  86. error: Error()
  87. }), Hall) : Hall).getInstance().player.get_item(1);
  88. if (num1 > 0) {
  89. layout.Empty_Ad.node.active = false;
  90. layout.Empty_RedPoint_num.node.parent.active = true;
  91. layout.Empty_RedPoint_num.string = num1.toString();
  92. } else {
  93. layout.Empty_Ad.node.active = true;
  94. layout.Empty_RedPoint_num.node.parent.active = false;
  95. }
  96. var num2 = (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  97. error: Error()
  98. }), Hall) : Hall).getInstance().player.get_item(3);
  99. if (num2 > 0) {
  100. layout.Eliminate_Ad.node.active = false;
  101. layout.Eliminate_RedPoint_num.node.parent.active = true;
  102. layout.Eliminate_RedPoint_num.string = num2.toString();
  103. } else {
  104. layout.Eliminate_Ad.node.active = true;
  105. layout.Eliminate_RedPoint_num.node.parent.active = false;
  106. }
  107. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  108. error: Error()
  109. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  110. error: Error()
  111. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  112. error: Error()
  113. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  114. error: Error()
  115. }), UI_Main) : UI_Main).evt.key.pause);
  116. _this.onButtonEvent(layout.Close_Btn, () => {
  117. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  118. error: Error()
  119. }), gui) : gui).close(UI_LatticeFull);
  120. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  121. error: Error()
  122. }), gui) : gui).show(_crd && UI_Fail === void 0 ? (_reportPossibleCrUseOfUI_Fail({
  123. error: Error()
  124. }), UI_Fail) : UI_Fail);
  125. });
  126. _this.onButtonEvent(layout.Eliminate, /*#__PURE__*/_asyncToGenerator(function* () {
  127. if (num1 <= 0) {
  128. var ret = yield chsdk.playRewardAd('获得道具' + 1);
  129. if (ret) {
  130. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  131. error: Error()
  132. }), Hall) : Hall).getInstance().player.add_item(1, 1);
  133. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  134. error: Error()
  135. }), Hall) : Hall).getInstance().player.use_item(1);
  136. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  137. error: Error()
  138. }), gui) : gui).close(UI_LatticeFull); //直接使用道具
  139. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  140. error: Error()
  141. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  142. error: Error()
  143. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  144. error: Error()
  145. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  146. error: Error()
  147. }), UI_Main) : UI_Main).evt.key.resume);
  148. }
  149. } else {
  150. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  151. error: Error()
  152. }), Hall) : Hall).getInstance().player.use_item(1);
  153. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  154. error: Error()
  155. }), gui) : gui).close(UI_LatticeFull); //直接使用道具
  156. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  157. error: Error()
  158. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  159. error: Error()
  160. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  161. error: Error()
  162. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  163. error: Error()
  164. }), UI_Main) : UI_Main).evt.key.resume);
  165. }
  166. }));
  167. _this.onButtonEvent(layout.Empty, /*#__PURE__*/_asyncToGenerator(function* () {
  168. if (num2 <= 0) {
  169. var ret = yield chsdk.playRewardAd('获得道具' + 3);
  170. if (ret) {
  171. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  172. error: Error()
  173. }), Hall) : Hall).getInstance().player.add_item(3, 1);
  174. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  175. error: Error()
  176. }), Hall) : Hall).getInstance().player.use_item(3);
  177. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  178. error: Error()
  179. }), gui) : gui).close(UI_LatticeFull); //直接使用道具
  180. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  181. error: Error()
  182. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  183. error: Error()
  184. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  185. error: Error()
  186. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  187. error: Error()
  188. }), UI_Main) : UI_Main).evt.key.resume);
  189. }
  190. } else {
  191. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  192. error: Error()
  193. }), Hall) : Hall).getInstance().player.use_item(3);
  194. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  195. error: Error()
  196. }), gui) : gui).close(UI_LatticeFull); //直接使用道具
  197. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  198. error: Error()
  199. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  200. error: Error()
  201. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  202. error: Error()
  203. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  204. error: Error()
  205. }), UI_Main) : UI_Main).evt.key.resume);
  206. }
  207. }));
  208. _this.onButtonEvent(layout.Click, () => {
  209. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  210. error: Error()
  211. }), gui) : gui).close(UI_LatticeFull); //放弃此局,跳至结算界面
  212. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  213. error: Error()
  214. }), gui) : gui).show(_crd && UI_Fail === void 0 ? (_reportPossibleCrUseOfUI_Fail({
  215. error: Error()
  216. }), UI_Fail) : UI_Fail);
  217. });
  218. })();
  219. }
  220. }) || _class));
  221. _cclegacy._RF.pop();
  222. _crd = false;
  223. }
  224. };
  225. });
  226. //# sourceMappingURL=a6ae0a69e4239c886f230a6efc663ae5eb37a39d.js.map