1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- System.register(["__unresolved_0", "cc", "__unresolved_1"], function (_export, _context) {
- "use strict";
- var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, TableUtil, _dec, _class, _class2, _crd, ccclass, property, table_store;
- function _reportPossibleCrUseOfTableUtil(extras) {
- _reporterNs.report("TableUtil", "./TableUtil", _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) {
- TableUtil = _unresolved_2.TableUtil;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "99137Yt4d1L6JBAI6/xf5DC", "table_store", undefined);
- __checkObsolete__(['_decorator', 'Component', 'Node']);
- ({
- ccclass,
- property
- } = _decorator);
- _export("table_store", table_store = (_dec = ccclass('table_store'), _dec(_class = (_class2 = class table_store {
- constructor() {
- this.data = void 0;
- /** 编号【KEY】 */
- this.id = 0;
- }
- static get(id) {
- return (_crd && TableUtil === void 0 ? (_reportPossibleCrUseOfTableUtil({
- error: Error()
- }), TableUtil) : TableUtil).getTable(table_store, id);
- }
- static getList() {
- return (_crd && TableUtil === void 0 ? (_reportPossibleCrUseOfTableUtil({
- error: Error()
- }), TableUtil) : TableUtil).getTables(table_store, 5);
- }
- init(id) {
- var table = (_crd && TableUtil === void 0 ? (_reportPossibleCrUseOfTableUtil({
- error: Error()
- }), TableUtil) : TableUtil).get(table_store.TableName);
- this.data = table[id];
- if (!this.data) console.error("配置表" + table_store.TableName + "没有ID:" + id);
- this.id = id;
- }
- get type() {
- return this.data.type;
- }
- get cost() {
- return this.data.cost;
- }
- get num() {
- return this.data.num;
- }
- get name() {
- return this.data.name;
- }
- }, _class2.TableName = "store", _class2)) || _class));
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=0e87907262cdfe9bb04b67b17e1eca1e38126d79.js.map
|