ef2d221df54a2db9265b17ea24ca2a0b327d2619.js 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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, GameUILayers, gui, ModuleDef, Layout_TimesOver, UI_Fail, Hall, ani_ui, UI_Main, _dec, _class, _crd, ccclass, property, UI_TimesOver;
  4. function _reportPossibleCrUseOfui_base(extras) {
  5. _reporterNs.report("ui_base", "../../../core/ui/ui_base", _context.meta, extras);
  6. }
  7. function _reportPossibleCrUseOfGameUILayers(extras) {
  8. _reporterNs.report("GameUILayers", "../../../core/ui/ui", _context.meta, extras);
  9. }
  10. function _reportPossibleCrUseOfgui(extras) {
  11. _reporterNs.report("gui", "../../../core/ui/ui", _context.meta, extras);
  12. }
  13. function _reportPossibleCrUseOfModuleDef(extras) {
  14. _reporterNs.report("ModuleDef", "../../../Scripts/ModuleDef", _context.meta, extras);
  15. }
  16. function _reportPossibleCrUseOfLayout_TimesOver(extras) {
  17. _reporterNs.report("Layout_TimesOver", "./Layout_TimesOver", _context.meta, extras);
  18. }
  19. function _reportPossibleCrUseOfUI_Fail(extras) {
  20. _reporterNs.report("UI_Fail", "../UI_Fail/UI_Fail", _context.meta, extras);
  21. }
  22. function _reportPossibleCrUseOfHall(extras) {
  23. _reporterNs.report("Hall", "../../hall/Hall", _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. function _reportPossibleCrUseOfLayout_Main(extras) {
  32. _reporterNs.report("Layout_Main", "../UI_Main/Layout_Main", _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. GameUILayers = _unresolved_3.GameUILayers;
  46. gui = _unresolved_3.gui;
  47. }, function (_unresolved_4) {
  48. ModuleDef = _unresolved_4.ModuleDef;
  49. }, function (_unresolved_5) {
  50. Layout_TimesOver = _unresolved_5.Layout_TimesOver;
  51. }, function (_unresolved_6) {
  52. UI_Fail = _unresolved_6.UI_Fail;
  53. }, function (_unresolved_7) {
  54. Hall = _unresolved_7.Hall;
  55. }, function (_unresolved_8) {
  56. ani_ui = _unresolved_8.ani_ui;
  57. UI_Main = _unresolved_8.UI_Main;
  58. }],
  59. execute: function () {
  60. _crd = true;
  61. _cclegacy._RF.push({}, "93f49g+PURGyJ0pLDMhVj8P", "UI_TimesOver", undefined);
  62. __checkObsolete__(['_decorator', 'Component', 'Node']);
  63. ({
  64. ccclass,
  65. property
  66. } = _decorator);
  67. _export("UI_TimesOver", UI_TimesOver = (_dec = ccclass('UI_TimesOver'), _dec(_class = class UI_TimesOver extends (_crd && ui_base === void 0 ? (_reportPossibleCrUseOfui_base({
  68. error: Error()
  69. }), ui_base) : ui_base) {
  70. constructor() {
  71. super((_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
  72. error: Error()
  73. }), ModuleDef) : ModuleDef).GAME, 'ui/UI_TimesOver/TimesOver', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
  74. error: Error()
  75. }), GameUILayers) : GameUILayers).HUD, _crd && Layout_TimesOver === void 0 ? (_reportPossibleCrUseOfLayout_TimesOver({
  76. error: Error()
  77. }), Layout_TimesOver) : Layout_TimesOver);
  78. }
  79. async onCreated() {
  80. const layout = this.getLayout();
  81. (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({
  82. error: Error()
  83. }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent);
  84. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  85. error: Error()
  86. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  87. error: Error()
  88. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  89. error: Error()
  90. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  91. error: Error()
  92. }), UI_Main) : UI_Main).evt.key.pause);
  93. let num = (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  94. error: Error()
  95. }), Hall) : Hall).getInstance().player.get_item(5);
  96. if (num > 0) {
  97. layout.AddTime_Ad.node.active = false;
  98. layout.RedPoint_num.node.parent.active = true;
  99. layout.RedPoint_num.string = num.toString();
  100. } else {
  101. layout.AddTime_Ad.node.active = true;
  102. layout.RedPoint_num.node.parent.active = false;
  103. } //已经消除方块/总方块
  104. layout.progressBar.progress = ((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  105. error: Error()
  106. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  107. error: Error()
  108. }), UI_Main) : UI_Main).getLayout().Container.count - (_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).getLayout().Container.idioms.length) / (_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).getLayout().Container.count;
  117. console.log((_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).getLayout().Container.count, (_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).getLayout().Container.idioms.length);
  126. layout.progressBar_Percent.string = Math.floor(layout.progressBar.progress * 100) + '%';
  127. this.onButtonEvent(layout.Close_Btn, () => {
  128. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  129. error: Error()
  130. }), gui) : gui).close(UI_TimesOver);
  131. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  132. error: Error()
  133. }), gui) : gui).show(_crd && UI_Fail === void 0 ? (_reportPossibleCrUseOfUI_Fail({
  134. error: Error()
  135. }), UI_Fail) : UI_Fail);
  136. });
  137. this.onButtonEvent(layout.AddTime, async () => {
  138. if (num <= 0) {
  139. const ret = await chsdk.playRewardAd('获得道具5');
  140. if (ret) {
  141. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  142. error: Error()
  143. }), gui) : gui).close(UI_TimesOver); //增加时间
  144. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  145. error: Error()
  146. }), Hall) : Hall).getInstance().player.add_item(5, 1);
  147. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  148. error: Error()
  149. }), Hall) : Hall).getInstance().player.use_item(5);
  150. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  151. error: Error()
  152. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  153. error: Error()
  154. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  155. error: Error()
  156. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  157. error: Error()
  158. }), UI_Main) : UI_Main).evt.key.resume);
  159. }
  160. } else {
  161. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  162. error: Error()
  163. }), gui) : gui).close(UI_TimesOver);
  164. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  165. error: Error()
  166. }), Hall) : Hall).getInstance().player.use_item(5); //增加时间
  167. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  168. error: Error()
  169. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  170. error: Error()
  171. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  172. error: Error()
  173. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  174. error: Error()
  175. }), UI_Main) : UI_Main).evt.key.resume);
  176. }
  177. });
  178. }
  179. }) || _class));
  180. _cclegacy._RF.pop();
  181. _crd = false;
  182. }
  183. };
  184. });
  185. //# sourceMappingURL=ef2d221df54a2db9265b17ea24ca2a0b327d2619.js.map