cd8a0e54-0c6d-4f70-b8ed-9abff8bf655e.js
1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"use strict";
cc._RF.push(module, 'cd8a05UDG1PcLjtmr/4v2Ve', 'IntroTableMgr');
// scripts/kernel/table/IntroTableMgr.ts
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IntroTableMgr = void 0;
var Global_1 = require("../../Global");
var TableDefine_1 = require("./TableDefine");
var IntroTableMgr = /** @class */ (function () {
function IntroTableMgr() {
this._levelList = [];
this._idList = [];
}
Object.defineProperty(IntroTableMgr, "ins", {
get: function () {
if (this._ins == null) {
this._ins = new IntroTableMgr();
var all = Global_1.tMgr.map[TableDefine_1.TableName.INTRO];
for (var key in all) {
if (Object.prototype.hasOwnProperty.call(all, key)) {
if (!Number(key)) {
continue;
}
var element = all[key];
if (element.Level > 0) {
this._ins._levelList.push(element.Level);
this._ins._idList.push(element.ID);
}
}
}
}
return this._ins;
},
enumerable: false,
configurable: true
});
IntroTableMgr.prototype.getTableByLevel = function (level) {
var index = this._levelList.indexOf(level);
if (index > -1) {
var id = this._idList[index];
return Global_1.tMgr.getConfig(TableDefine_1.TableName.INTRO, id);
}
return null;
};
IntroTableMgr._ins = null;
return IntroTableMgr;
}());
exports.IntroTableMgr = IntroTableMgr;
cc._RF.pop();