123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- 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) {
- "use strict";
- 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;
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
- function _reportPossibleCrUseOfui_base(extras) {
- _reporterNs.report("ui_base", "../../../core/ui/ui_base", _context.meta, extras);
- }
- function _reportPossibleCrUseOfGameUILayers(extras) {
- _reporterNs.report("GameUILayers", "../../../core/ui/ui", _context.meta, extras);
- }
- function _reportPossibleCrUseOfgui(extras) {
- _reporterNs.report("gui", "../../../core/ui/ui", _context.meta, extras);
- }
- function _reportPossibleCrUseOfModuleDef(extras) {
- _reporterNs.report("ModuleDef", "../../../Scripts/ModuleDef", _context.meta, extras);
- }
- function _reportPossibleCrUseOfLayout_TimesOver(extras) {
- _reporterNs.report("Layout_TimesOver", "./Layout_TimesOver", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_Fail(extras) {
- _reporterNs.report("UI_Fail", "../UI_Fail/UI_Fail", _context.meta, extras);
- }
- function _reportPossibleCrUseOfani_ui(extras) {
- _reporterNs.report("ani_ui", "../UI_Main/UI_Main", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_Main(extras) {
- _reporterNs.report("UI_Main", "../UI_Main/UI_Main", _context.meta, extras);
- }
- function _reportPossibleCrUseOfLayout_Main(extras) {
- _reporterNs.report("Layout_Main", "../UI_Main/Layout_Main", _context.meta, extras);
- }
- function _reportPossibleCrUseOfch_audio(extras) {
- _reporterNs.report("ch_audio", "../../../ch/audio/audio", _context.meta, extras);
- }
- function _reportPossibleCrUseOfHall(extras) {
- _reporterNs.report("Hall", "../../hall/Hall", _context.meta, extras);
- }
- function _reportPossibleCrUseOfch(extras) {
- _reporterNs.report("ch", "../../../ch/ch", _context.meta, extras);
- }
- return {
- setters: [function (_unresolved_) {
- _reporterNs = _unresolved_;
- }, function (_cc) {
- _cclegacy = _cc.cclegacy;
- __checkObsolete__ = _cc.__checkObsolete__;
- __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
- _decorator = _cc._decorator;
- }, function (_unresolved_2) {
- ui_base = _unresolved_2.default;
- }, function (_unresolved_3) {
- GameUILayers = _unresolved_3.GameUILayers;
- gui = _unresolved_3.gui;
- }, function (_unresolved_4) {
- ModuleDef = _unresolved_4.ModuleDef;
- }, function (_unresolved_5) {
- Layout_TimesOver = _unresolved_5.Layout_TimesOver;
- }, function (_unresolved_6) {
- UI_Fail = _unresolved_6.UI_Fail;
- }, function (_unresolved_7) {
- ani_ui = _unresolved_7.ani_ui;
- UI_Main = _unresolved_7.UI_Main;
- }, function (_unresolved_8) {
- ch_audio = _unresolved_8.default;
- }, function (_unresolved_9) {
- Hall = _unresolved_9.Hall;
- }, function (_unresolved_10) {
- ch = _unresolved_10.ch;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "93f49g+PURGyJ0pLDMhVj8P", "UI_TimesOver", undefined);
- __checkObsolete__(['_decorator', 'Component', 'Node']);
- ({
- ccclass,
- property
- } = _decorator);
- _export("UI_TimesOver", UI_TimesOver = (_dec = ccclass('UI_TimesOver'), _dec(_class = class UI_TimesOver extends (_crd && ui_base === void 0 ? (_reportPossibleCrUseOfui_base({
- error: Error()
- }), ui_base) : ui_base) {
- constructor() {
- super((_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
- error: Error()
- }), ModuleDef) : ModuleDef).GAME, 'ui/UI_TimesOver/TimesOver', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
- error: Error()
- }), GameUILayers) : GameUILayers).HUD, _crd && Layout_TimesOver === void 0 ? (_reportPossibleCrUseOfLayout_TimesOver({
- error: Error()
- }), Layout_TimesOver) : Layout_TimesOver);
- }
- onCreated() {
- var _this = this;
- return _asyncToGenerator(function* () {
- var layout = _this.getLayout();
- (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({
- error: Error()
- }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent);
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).evt.key.pause);
- var num = (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.get_item(5);
- if (num > 0) {
- layout.AddTime_Ad.node.active = false;
- layout.RedPoint_num.node.parent.active = true;
- layout.RedPoint_num.string = num.toString();
- } else {
- layout.AddTime_Ad.node.active = true;
- layout.RedPoint_num.node.parent.active = false;
- } //已经消除方块/总方块
- layout.progressBar.progress = ((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).getLayout().Container.count - (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).getLayout().Container.idioms.length) / (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).getLayout().Container.count;
- console.log((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).getLayout().Container.count, (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).getLayout().Container.idioms.length);
- layout.progressBar_Percent.string = Math.floor(layout.progressBar.progress * 100) + '%';
- _this.onButtonEvent(layout.Close_Btn, () => {
- (_crd && ch_audio === void 0 ? (_reportPossibleCrUseOfch_audio({
- error: Error()
- }), ch_audio) : ch_audio).getInstance().playOneShot('sound/click_Btn');
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).close(UI_TimesOver);
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).show(_crd && UI_Fail === void 0 ? (_reportPossibleCrUseOfUI_Fail({
- error: Error()
- }), UI_Fail) : UI_Fail);
- });
- _this.onButtonEvent(layout.AddTime, /*#__PURE__*/_asyncToGenerator(function* () {
- (_crd && ch_audio === void 0 ? (_reportPossibleCrUseOfch_audio({
- error: Error()
- }), ch_audio) : ch_audio).getInstance().playOneShot('sound/click_Btn');
- if (num <= 0) {
- var ret = yield chsdk.playRewardAd('获得道具5');
- if (ret) {
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).close(UI_TimesOver); //增加时间
- (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.add_item(5, 1);
- (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.use_item(5);
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).evt.key.resume);
- (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).audio.resume();
- }
- } else {
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).close(UI_TimesOver);
- (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.use_item(5); //增加时间
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).evt.emit((_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).get(_crd && UI_Main === void 0 ? (_reportPossibleCrUseOfUI_Main({
- error: Error()
- }), UI_Main) : UI_Main).evt.key.resume);
- }
- }));
- })();
- }
- }) || _class));
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=8d3d22f59bd6c497dcec20b4e5c10da28017adf0.js.map
|