a6ae0a69e4239c886f230a6efc663ae5eb37a39d.js 13 KB

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