ef2d221df54a2db9265b17ea24ca2a0b327d2619.js 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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, GameUILayers, gui, ModuleDef, Layout_TimesOver, UI_Fail, ani_ui, UI_Main, ch_audio, Hall, _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 _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 _reportPossibleCrUseOfLayout_Main(extras) {
  29. _reporterNs.report("Layout_Main", "../UI_Main/Layout_Main", _context.meta, extras);
  30. }
  31. function _reportPossibleCrUseOfch_audio(extras) {
  32. _reporterNs.report("ch_audio", "../../../ch/audio/audio", _context.meta, extras);
  33. }
  34. function _reportPossibleCrUseOfHall(extras) {
  35. _reporterNs.report("Hall", "../../hall/Hall", _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. GameUILayers = _unresolved_3.GameUILayers;
  49. gui = _unresolved_3.gui;
  50. }, function (_unresolved_4) {
  51. ModuleDef = _unresolved_4.ModuleDef;
  52. }, function (_unresolved_5) {
  53. Layout_TimesOver = _unresolved_5.Layout_TimesOver;
  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. }],
  64. execute: function () {
  65. _crd = true;
  66. _cclegacy._RF.push({}, "93f49g+PURGyJ0pLDMhVj8P", "UI_TimesOver", undefined);
  67. __checkObsolete__(['_decorator', 'Component', 'Node']);
  68. ({
  69. ccclass,
  70. property
  71. } = _decorator);
  72. _export("UI_TimesOver", UI_TimesOver = (_dec = ccclass('UI_TimesOver'), _dec(_class = class UI_TimesOver extends (_crd && ui_base === void 0 ? (_reportPossibleCrUseOfui_base({
  73. error: Error()
  74. }), ui_base) : ui_base) {
  75. constructor() {
  76. super((_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
  77. error: Error()
  78. }), ModuleDef) : ModuleDef).GAME, 'ui/UI_TimesOver/TimesOver', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
  79. error: Error()
  80. }), GameUILayers) : GameUILayers).HUD, _crd && Layout_TimesOver === void 0 ? (_reportPossibleCrUseOfLayout_TimesOver({
  81. error: Error()
  82. }), Layout_TimesOver) : Layout_TimesOver);
  83. }
  84. async onCreated() {
  85. const layout = this.getLayout();
  86. (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({
  87. error: Error()
  88. }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent);
  89. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  90. error: Error()
  91. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  92. error: Error()
  93. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  94. error: Error()
  95. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  96. error: Error()
  97. }), UI_Main) : UI_Main).evt.key.pause);
  98. let num = (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  99. error: Error()
  100. }), Hall) : Hall).getInstance().player.get_item(5);
  101. if (num > 0) {
  102. layout.AddTime_Ad.node.active = false;
  103. layout.RedPoint_num.node.parent.active = true;
  104. layout.RedPoint_num.string = num.toString();
  105. } else {
  106. layout.AddTime_Ad.node.active = true;
  107. layout.RedPoint_num.node.parent.active = false;
  108. } //已经消除方块/总方块
  109. layout.progressBar.progress = ((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  110. error: Error()
  111. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  112. error: Error()
  113. }), UI_Main) : UI_Main).getLayout().Container.count - (_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).getLayout().Container.idioms.length) / (_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;
  122. console.log((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  123. error: Error()
  124. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  125. error: Error()
  126. }), UI_Main) : UI_Main).getLayout().Container.count, (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  127. error: Error()
  128. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  129. error: Error()
  130. }), UI_Main) : UI_Main).getLayout().Container.idioms.length);
  131. layout.progressBar_Percent.string = Math.floor(layout.progressBar.progress * 100) + '%';
  132. this.onButtonEvent(layout.Close_Btn, () => {
  133. (_crd && ch_audio === void 0 ? (_reportPossibleCrUseOfch_audio({
  134. error: Error()
  135. }), ch_audio) : ch_audio).getInstance().playOneShot('sound/click_Btn');
  136. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  137. error: Error()
  138. }), gui) : gui).close(UI_TimesOver);
  139. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  140. error: Error()
  141. }), gui) : gui).show(_crd && UI_Fail === void 0 ? (_reportPossibleCrUseOfUI_Fail({
  142. error: Error()
  143. }), UI_Fail) : UI_Fail);
  144. });
  145. this.onButtonEvent(layout.AddTime, async () => {
  146. (_crd && ch_audio === void 0 ? (_reportPossibleCrUseOfch_audio({
  147. error: Error()
  148. }), ch_audio) : ch_audio).getInstance().playOneShot('sound/click_Btn');
  149. if (num <= 0) {
  150. const ret = await chsdk.playRewardAd('获得道具5');
  151. if (ret) {
  152. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  153. error: Error()
  154. }), gui) : gui).close(UI_TimesOver); //增加时间
  155. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  156. error: Error()
  157. }), Hall) : Hall).getInstance().player.add_item(5, 1);
  158. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  159. error: Error()
  160. }), Hall) : Hall).getInstance().player.use_item(5);
  161. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  162. error: Error()
  163. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  164. error: Error()
  165. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  166. error: Error()
  167. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  168. error: Error()
  169. }), UI_Main) : UI_Main).evt.key.resume);
  170. }
  171. } else {
  172. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  173. error: Error()
  174. }), gui) : gui).close(UI_TimesOver);
  175. (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  176. error: Error()
  177. }), Hall) : Hall).getInstance().player.use_item(5); //增加时间
  178. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  179. error: Error()
  180. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  181. error: Error()
  182. }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  183. error: Error()
  184. }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
  185. error: Error()
  186. }), UI_Main) : UI_Main).evt.key.resume);
  187. }
  188. });
  189. }
  190. }) || _class));
  191. _cclegacy._RF.pop();
  192. _crd = false;
  193. }
  194. };
  195. });
  196. //# sourceMappingURL=ef2d221df54a2db9265b17ea24ca2a0b327d2619.js.map