a6ae0a69e4239c886f230a6efc663ae5eb37a39d.js 11 KB

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