8d3d22f59bd6c497dcec20b4e5c10da28017adf0.js 10 KB

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