c64df2e3efb6ad404a034dbf9da0adc2e8042e7a.js 12 KB

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