123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5"], function (_export, _context) {
- "use strict";
- var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, Layout_Set, ModuleDef, GameUILayers, gui, ui_base, ch, get_new_wait, UI_Set, _crd;
- 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 _reportPossibleCrUseOfLayout_Set(extras) {
- _reporterNs.report("Layout_Set", "./Layout_Set", _context.meta, extras);
- }
- function _reportPossibleCrUseOfModuleDef(extras) {
- _reporterNs.report("ModuleDef", "../../scripts/ModuleDef", _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 _reportPossibleCrUseOfui_base(extras) {
- _reporterNs.report("ui_base", "../../core/ui/ui", _context.meta, extras);
- }
- function _reportPossibleCrUseOfch(extras) {
- _reporterNs.report("ch", "../../ch/ch", _context.meta, extras);
- }
- function _reportPossibleCrUseOfget_new_wait(extras) {
- _reporterNs.report("get_new_wait", "../../core/util_class/Wait", _context.meta, extras);
- }
- _export("UI_Set", void 0);
- return {
- setters: [function (_unresolved_) {
- _reporterNs = _unresolved_;
- }, function (_cc) {
- _cclegacy = _cc.cclegacy;
- __checkObsolete__ = _cc.__checkObsolete__;
- __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
- }, function (_unresolved_2) {
- Layout_Set = _unresolved_2.Layout_Set;
- }, function (_unresolved_3) {
- ModuleDef = _unresolved_3.ModuleDef;
- }, function (_unresolved_4) {
- GameUILayers = _unresolved_4.GameUILayers;
- gui = _unresolved_4.gui;
- ui_base = _unresolved_4.ui_base;
- }, function (_unresolved_5) {
- ch = _unresolved_5.ch;
- }, function (_unresolved_6) {
- get_new_wait = _unresolved_6.default;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "f6ce46tVeNIMLXLIOeXtxW8", "UI_Set", undefined);
- __checkObsolete__(['Button', 'Size', 'Toggle']);
- _export("UI_Set", UI_Set = class UI_Set 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).BASIC, 'ui_set/UI_Set', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
- error: Error()
- }), GameUILayers) : GameUILayers).POPUP, _crd && Layout_Set === void 0 ? (_reportPossibleCrUseOfLayout_Set({
- error: Error()
- }), Layout_Set) : Layout_Set);
- this.wait = (_crd && get_new_wait === void 0 ? (_reportPossibleCrUseOfget_new_wait({
- error: Error()
- }), get_new_wait) : get_new_wait)();
- }
- onCreated(is_in_game) {
- var layout = this.getLayout();
- this.onButtonEvent(layout.btnClose, this.onClose, this);
- this.onButtonEvent(layout.btnRestart, this.onRestart, this);
- this.onButtonEvent(layout.btnMain, this.onMain, this);
- layout.toogleMusic.isChecked = (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).audio.volumeMusic == 0;
- layout.toogleSound.isChecked = !(_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).audio.switchEffect;
- this.onToggleEvent(layout.toogleMusic, this.onMusic, this);
- this.onToggleEvent(layout.toogleSound, this.onSound, this);
- (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).audio.pause();
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).scale_anim(layout.btnClose.node.parent); //
- layout.btnRestart.node.active = is_in_game;
- layout.btnMain.node.active = is_in_game;
- }
- onClose(button) {
- this.wait.resolve(null);
- this.close();
- (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).audio.resume();
- }
- await_choose() {
- var _this = this;
- return _asyncToGenerator(function* () {
- return _this.wait.wait();
- })();
- }
- onRestart(button) {
- this.wait.resolve('restart');
- this.close();
- }
- onMain(button) {
- this.wait.resolve('remain');
- this.close();
- }
- onMusic(toggle) {
- (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).audio.volumeMusic = toggle.isChecked ? 0 : 1;
- (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).audio.save();
- }
- onSound(toggle) {
- (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).audio.switchEffect = !toggle.isChecked;
- (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).audio.save();
- }
- onDispose() {
- var _this$wait, _this$wait2;
- (_this$wait = this.wait) == null || _this$wait.resolve(null);
- (_this$wait2 = this.wait) == null || _this$wait2.dispose();
- this.wait = null;
- }
- });
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=a441a6ac46987c8a416f5e72b0d42fb15596ae3b.js.map
|