123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362 |
- System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7", "__unresolved_8", "__unresolved_9", "__unresolved_10", "__unresolved_11", "__unresolved_12", "__unresolved_13", "__unresolved_14", "__unresolved_15", "__unresolved_16"], function (_export, _context) {
- "use strict";
- var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Layout_Hall, UI_Rank, UI_Settings, UI_Sign, UI_Invite, GameUILayers, gui, ui_base, ResUtil, ModuleDef, SceneDef, UI_Store, UI_SideBar, UI_Task, ch_audio, GameState, Hall, life_countdown_Max, UI_Life, _dec, _class, _crd, ccclass, property, UI_Hall;
- 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_Hall(extras) {
- _reporterNs.report("Layout_Hall", "./Layout_Hall", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_Rank(extras) {
- _reporterNs.report("UI_Rank", "../UI_Rank/UI_Rank", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_Settings(extras) {
- _reporterNs.report("UI_Settings", "../UI_Settings/UI_Settings", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_Sign(extras) {
- _reporterNs.report("UI_Sign", "../UI_Sign/UI_Sign", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_Invite(extras) {
- _reporterNs.report("UI_Invite", "../UI_Invite/UI_Invite", _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_base", _context.meta, extras);
- }
- function _reportPossibleCrUseOfResUtil(extras) {
- _reporterNs.report("ResUtil", "../../../core/util/ResUtil", _context.meta, extras);
- }
- function _reportPossibleCrUseOfModuleDef(extras) {
- _reporterNs.report("ModuleDef", "../../../Scripts/ModuleDef", _context.meta, extras);
- }
- function _reportPossibleCrUseOfSceneDef(extras) {
- _reporterNs.report("SceneDef", "../../../Scripts/SceneDef", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_Store(extras) {
- _reporterNs.report("UI_Store", "../UI_Store/UI_Store", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_SideBar(extras) {
- _reporterNs.report("UI_SideBar", "../UI_SideBar/UI_SideBar", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_Task(extras) {
- _reporterNs.report("UI_Task", "../UI_Task/UI_Task", _context.meta, extras);
- }
- function _reportPossibleCrUseOfch_audio(extras) {
- _reporterNs.report("ch_audio", "../../../ch/audio/audio", _context.meta, extras);
- }
- function _reportPossibleCrUseOfGameState(extras) {
- _reporterNs.report("GameState", "../../hall/Hall", _context.meta, extras);
- }
- function _reportPossibleCrUseOfHall(extras) {
- _reporterNs.report("Hall", "../../hall/Hall", _context.meta, extras);
- }
- function _reportPossibleCrUseOflife_countdown_Max(extras) {
- _reporterNs.report("life_countdown_Max", "../../hall/Hall", _context.meta, extras);
- }
- function _reportPossibleCrUseOfUI_Life(extras) {
- _reporterNs.report("UI_Life", "../UI_Life/UI_Life", _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) {
- Layout_Hall = _unresolved_2.Layout_Hall;
- }, function (_unresolved_3) {
- UI_Rank = _unresolved_3.UI_Rank;
- }, function (_unresolved_4) {
- UI_Settings = _unresolved_4.UI_Settings;
- }, function (_unresolved_5) {
- UI_Sign = _unresolved_5.UI_Sign;
- }, function (_unresolved_6) {
- UI_Invite = _unresolved_6.UI_Invite;
- }, function (_unresolved_7) {
- GameUILayers = _unresolved_7.GameUILayers;
- gui = _unresolved_7.gui;
- }, function (_unresolved_8) {
- ui_base = _unresolved_8.default;
- }, function (_unresolved_9) {
- ResUtil = _unresolved_9.ResUtil;
- }, function (_unresolved_10) {
- ModuleDef = _unresolved_10.ModuleDef;
- }, function (_unresolved_11) {
- SceneDef = _unresolved_11.SceneDef;
- }, function (_unresolved_12) {
- UI_Store = _unresolved_12.UI_Store;
- }, function (_unresolved_13) {
- UI_SideBar = _unresolved_13.UI_SideBar;
- }, function (_unresolved_14) {
- UI_Task = _unresolved_14.UI_Task;
- }, function (_unresolved_15) {
- ch_audio = _unresolved_15.default;
- }, function (_unresolved_16) {
- GameState = _unresolved_16.GameState;
- Hall = _unresolved_16.Hall;
- life_countdown_Max = _unresolved_16.life_countdown_Max;
- }, function (_unresolved_17) {
- UI_Life = _unresolved_17.UI_Life;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "e5a30zX/fVMaZSMsA9kifAa", "UI_Hall", undefined);
- __checkObsolete__(['_decorator', 'Button', 'Component', 'Node']);
- ({
- ccclass,
- property
- } = _decorator);
- _export("UI_Hall", UI_Hall = (_dec = ccclass('UI_Hall'), _dec(_class = class UI_Hall 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_Hall/Hall', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
- error: Error()
- }), GameUILayers) : GameUILayers).GAME, _crd && Layout_Hall === void 0 ? (_reportPossibleCrUseOfLayout_Hall({
- error: Error()
- }), Layout_Hall) : Layout_Hall);
- }
- onCreated() {
- if ((_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().gameState == (_crd && GameState === void 0 ? (_reportPossibleCrUseOfGameState({
- error: Error()
- }), GameState) : GameState).fail) {
- if ((_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.get_life() == 5) {
- (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.set_life_countdown(_crd && life_countdown_Max === void 0 ? (_reportPossibleCrUseOflife_countdown_Max({
- error: Error()
- }), life_countdown_Max) : life_countdown_Max);
- }
- (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.set_life((_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.get_life() - 1);
- }
- (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().gameState = (_crd && GameState === void 0 ? (_reportPossibleCrUseOfGameState({
- error: Error()
- }), GameState) : GameState).win;
- (_crd && ch_audio === void 0 ? (_reportPossibleCrUseOfch_audio({
- error: Error()
- }), ch_audio) : ch_audio).getInstance().play('sound/bgm');
- var layout = this.getLayout();
- this.onButtonEvent(layout.Start_Btn, () => {
- (_crd && ch_audio === void 0 ? (_reportPossibleCrUseOfch_audio({
- error: Error()
- }), ch_audio) : ch_audio).getInstance().playOneShot('sound/click_Btn');
- (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().sceneChanging = false;
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).close(UI_Hall);
- (_crd && ResUtil === void 0 ? (_reportPossibleCrUseOfResUtil({
- error: Error()
- }), ResUtil) : ResUtil).loadScene((_crd && SceneDef === void 0 ? (_reportPossibleCrUseOfSceneDef({
- error: Error()
- }), SceneDef) : SceneDef).GAME, (_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
- error: Error()
- }), ModuleDef) : ModuleDef).GAME, true);
- });
- this.onButtonEvent(layout.Settings_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).show(_crd && UI_Settings === void 0 ? (_reportPossibleCrUseOfUI_Settings({
- error: Error()
- }), UI_Settings) : UI_Settings);
- });
- this.onButtonEvent(layout.Rank_Btn, /*#__PURE__*/_asyncToGenerator(function* () {
- (_crd && ch_audio === void 0 ? (_reportPossibleCrUseOfch_audio({
- error: Error()
- }), ch_audio) : ch_audio).getInstance().playOneShot('sound/click_Btn');
- yield (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.loadPfInfo();
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).show(_crd && UI_Rank === void 0 ? (_reportPossibleCrUseOfUI_Rank({
- error: Error()
- }), UI_Rank) : UI_Rank);
- }));
- this.onButtonEvent(layout.Sign_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).show(_crd && UI_Sign === void 0 ? (_reportPossibleCrUseOfUI_Sign({
- error: Error()
- }), UI_Sign) : UI_Sign);
- });
- this.onButtonEvent(layout.Invite_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).show(_crd && UI_Invite === void 0 ? (_reportPossibleCrUseOfUI_Invite({
- error: Error()
- }), UI_Invite) : UI_Invite);
- });
- this.onButtonEvent(layout.Store_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).show(_crd && UI_Store === void 0 ? (_reportPossibleCrUseOfUI_Store({
- error: Error()
- }), UI_Store) : UI_Store);
- });
- this.onButtonEvent(layout.Task_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).show(_crd && UI_Task === void 0 ? (_reportPossibleCrUseOfUI_Task({
- error: Error()
- }), UI_Task) : UI_Task);
- });
- this.onButtonEvent(layout.Search_Btn, () => {
- (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.set_max_floor(parseInt(layout.Search_EditBox.string) - 1);
- (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
- error: Error()
- }), gui) : gui).close(UI_Hall);
- (_crd && ResUtil === void 0 ? (_reportPossibleCrUseOfResUtil({
- error: Error()
- }), ResUtil) : ResUtil).loadScene((_crd && SceneDef === void 0 ? (_reportPossibleCrUseOfSceneDef({
- error: Error()
- }), SceneDef) : SceneDef).GAME, (_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
- error: Error()
- }), ModuleDef) : ModuleDef).GAME, true);
- });
- if (chsdk.checkHasSidebar()) {
- layout.SideBar_Btn.node.active = true;
- this.onButtonEvent(layout.SideBar_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).show(_crd && UI_SideBar === void 0 ? (_reportPossibleCrUseOfUI_SideBar({
- error: Error()
- }), UI_SideBar) : UI_SideBar);
- });
- } else {
- layout.SideBar_Btn.node.active = false;
- }
- this.onButtonEvent(layout.Life_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).show(_crd && UI_Life === void 0 ? (_reportPossibleCrUseOfUI_Life({
- error: Error()
- }), UI_Life) : UI_Life);
- });
- layout.Life_Num.string = (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.get_life().toString();
- if ((_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.get_life_countdown() > 0) {
- layout.Life_CountDown.node.active = true;
- layout.Life_CountDown.node.parent.active = true;
- var minute = Math.floor((_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.get_life_countdown() / 60);
- var second = (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
- error: Error()
- }), Hall) : Hall).getInstance().player.get_life_countdown() % 60;
- layout.Life_CountDown.string = (minute >= 10 ? minute : '0' + minute) + ':' + (second >= 10 ? second : '0' + second) + "后+1";
- } else {
- layout.Life_CountDown.node.active = false;
- layout.Life_CountDown.node.parent.active = false;
- }
- }
- update(deltaTime) {}
- set_Life(value) {
- var layout = this.getLayout();
- layout.Life_Num.string = value.toString();
- }
- set_Life_CountDown(value, flag) {
- var layout = this.getLayout();
- if (flag) {
- layout.Life_CountDown.node.active = true;
- layout.Life_CountDown.node.parent.active = true;
- var minute = Math.floor(value / 60);
- var second = value % 60;
- layout.Life_CountDown.string = (minute >= 10 ? minute : '0' + minute) + ':' + (second >= 10 ? second : '0' + second) + "后+1";
- } else {
- layout.Life_CountDown.node.active = false;
- layout.Life_CountDown.node.parent.active = false;
- }
- }
- }) || _class));
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=2cb4568cc17fc880801c649b7e09213445038932.js.map
|