a6ae0a69e4239c886f230a6efc663ae5eb37a39d.js 12 KB

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