2d7e3424c179d135dc59489a147ede15a8748562.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, GameUILayers, gui, ui_base, ModuleDef, Layout_Rank, ani_ui, UIWaiting, Hall, _dec, _class, _crd, ccclass, property, type, UI_Rank;
  4. 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); } }
  5. 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); }); }; }
  6. function _reportPossibleCrUseOfGameUILayers(extras) {
  7. _reporterNs.report("GameUILayers", "db://assets/core/ui/ui", _context.meta, extras);
  8. }
  9. function _reportPossibleCrUseOfgui(extras) {
  10. _reporterNs.report("gui", "db://assets/core/ui/ui", _context.meta, extras);
  11. }
  12. function _reportPossibleCrUseOfui_base(extras) {
  13. _reporterNs.report("ui_base", "db://assets/core/ui/ui_base", _context.meta, extras);
  14. }
  15. function _reportPossibleCrUseOfModuleDef(extras) {
  16. _reporterNs.report("ModuleDef", "db://assets/Scripts/ModuleDef", _context.meta, extras);
  17. }
  18. function _reportPossibleCrUseOfLayout_Rank(extras) {
  19. _reporterNs.report("Layout_Rank", "./Layout_Rank", _context.meta, extras);
  20. }
  21. function _reportPossibleCrUseOfani_ui(extras) {
  22. _reporterNs.report("ani_ui", "../UI_Main/UI_Main", _context.meta, extras);
  23. }
  24. function _reportPossibleCrUseOfUIWaiting(extras) {
  25. _reporterNs.report("UIWaiting", "db://assets/module_basic/ui_waiting/UIWaiting", _context.meta, extras);
  26. }
  27. function _reportPossibleCrUseOfHall(extras) {
  28. _reporterNs.report("Hall", "db://assets/Scripts/Hall", _context.meta, extras);
  29. }
  30. return {
  31. setters: [function (_unresolved_) {
  32. _reporterNs = _unresolved_;
  33. }, function (_cc) {
  34. _cclegacy = _cc.cclegacy;
  35. __checkObsolete__ = _cc.__checkObsolete__;
  36. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  37. _decorator = _cc._decorator;
  38. }, function (_unresolved_2) {
  39. GameUILayers = _unresolved_2.GameUILayers;
  40. gui = _unresolved_2.gui;
  41. }, function (_unresolved_3) {
  42. ui_base = _unresolved_3.default;
  43. }, function (_unresolved_4) {
  44. ModuleDef = _unresolved_4.ModuleDef;
  45. }, function (_unresolved_5) {
  46. Layout_Rank = _unresolved_5.Layout_Rank;
  47. }, function (_unresolved_6) {
  48. ani_ui = _unresolved_6.ani_ui;
  49. }, function (_unresolved_7) {
  50. UIWaiting = _unresolved_7.UIWaiting;
  51. }, function (_unresolved_8) {
  52. Hall = _unresolved_8.Hall;
  53. }],
  54. execute: function () {
  55. _crd = true;
  56. _cclegacy._RF.push({}, "25b8cJMNUNOA77jdI7BF1kA", "UI_Rank", undefined);
  57. __checkObsolete__(['_decorator', 'Component', 'Node', 'Toggle']);
  58. ({
  59. ccclass,
  60. property
  61. } = _decorator);
  62. //1总榜2好友榜
  63. type = 1;
  64. _export("UI_Rank", UI_Rank = (_dec = ccclass('UI_Rank'), _dec(_class = class UI_Rank extends (_crd && ui_base === void 0 ? (_reportPossibleCrUseOfui_base({
  65. error: Error()
  66. }), ui_base) : ui_base) {
  67. constructor() {
  68. super((_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
  69. error: Error()
  70. }), ModuleDef) : ModuleDef).GAME, 'ui/UI_Rank/Rank', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
  71. error: Error()
  72. }), GameUILayers) : GameUILayers).HUD, _crd && Layout_Rank === void 0 ? (_reportPossibleCrUseOfLayout_Rank({
  73. error: Error()
  74. }), Layout_Rank) : Layout_Rank);
  75. this._owner = void 0;
  76. this._data = void 0;
  77. }
  78. onCreated() {
  79. var _this = this;
  80. return _asyncToGenerator(function* () {
  81. var layout = _this.getLayout();
  82. (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({
  83. error: Error()
  84. }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent);
  85. _this.onButtonEvent(layout.Close_Btn, /*#__PURE__*/_asyncToGenerator(function* (button) {
  86. //关闭设置界面
  87. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  88. error: Error()
  89. }), gui) : gui).close(UI_Rank);
  90. }), _this);
  91. layout.onList1 = (item, index) => {// item.getComponent(ui_skin_item).showInfo(index + 1, this._data1[index]);
  92. };
  93. layout.onList2 = (item, index) => {// item.getComponent(ui_skin_block).showInfo(index + 1, this._data2[index]);
  94. };
  95. layout.list1.numItems = type == 1 ? 10 : 0;
  96. layout.list2.numItems = type == 2 ? 10 : 0;
  97. layout.Rank_Toggle_1.isChecked = type == 1;
  98. layout.Rank_Toggle_2.isChecked = type == 2;
  99. _this.show();
  100. _this.onToggleEvent(layout.Rank_Toggle_1, (tg, i) => {
  101. if (tg.isChecked) _this.show(i);
  102. }, _this, 1);
  103. _this.onToggleEvent(layout.Rank_Toggle_2, (tg, i) => {
  104. if (tg.isChecked) _this.show(i);
  105. }, _this, 2);
  106. })();
  107. }
  108. show(t) {
  109. var _this2 = this;
  110. return _asyncToGenerator(function* () {
  111. if (t != null) {
  112. if (t == type) return;
  113. type = t; // button_sound();
  114. }
  115. var layout = _this2.getLayout();
  116. yield (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  117. error: Error()
  118. }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  119. error: Error()
  120. }), UIWaiting) : UIWaiting);
  121. if (type == 1) {
  122. layout.list1.node.active = true;
  123. layout.list1.numItems = 0;
  124. var d = yield (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  125. error: Error()
  126. }), Hall) : Hall).getInstance().player.get_rank_floor();
  127. _this2._data = d.list;
  128. _this2._owner = d.owner;
  129. var index = d.index;
  130. layout.list1.numItems = _this2._data.length;
  131. if (!_this2._owner) {
  132. _this2._owner = {
  133. head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  134. error: Error()
  135. }), Hall) : Hall).getInstance().player.avatarUrl,
  136. nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  137. error: Error()
  138. }), Hall) : Hall).getInstance().player.nickName,
  139. score: 0,
  140. userId: 0,
  141. province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  142. error: Error()
  143. }), Hall) : Hall).getInstance().player.user_info.province
  144. }; // layout.own_item.showInfo(index, type, this._ower, true);
  145. }
  146. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  147. error: Error()
  148. }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  149. error: Error()
  150. }), UIWaiting) : UIWaiting);
  151. }
  152. if (type == 2) {
  153. layout.list2.node.active = true;
  154. }
  155. })();
  156. }
  157. }) || _class));
  158. _cclegacy._RF.pop();
  159. _crd = false;
  160. }
  161. };
  162. });
  163. //# sourceMappingURL=2d7e3424c179d135dc59489a147ede15a8748562.js.map