12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- var t = require;
- var e = module;
- var i = exports;
- e =
- (this && this.__decorate) ||
- function (t, e, i, s) {
- var o,
- a = arguments.length,
- n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s;
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s);
- else
- for (var r = t.length - 1; 0 <= r; r--)
- (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n);
- return 3 < a && n && Object.defineProperty(e, i, n), n;
- };
- Object.defineProperty(i, "__esModule", {value: !0});
- const s = t("StopAutoDeclare"),
- o = t("GameText"),
- a = t("CostumeBagItem"),
- n = t("MainCat"),
- {ccclass: r, property: l} = cc._decorator;
- t = class extends s.default {
- constructor() {
- super(...arguments),
- (this.equipCostumeNode = null),
- (this.mainCat = null),
- (this.costumeBagEquipItems = []),
- (this.mainCatNode = null),
- (this.nameLab = null),
- (this.data = null);
- }
- onLoad() {
- for (const t of this.equipCostumeNode.children)
- this.costumeBagEquipItems.push(t.getComponent(a.CostumeBagItem));
- this.mainCat = this.mainCatNode.getComponent(n.default);
- }
- setData(e) {
- this.data = e;
- let i = this.costumeBagEquipItems.length;
- for (let t = 0; t < i; t++) {
- const i = this.costumeBagEquipItems[t],
- s = e.equipItems[t + 1];
- i.setData(s);
- }
- this.mainCat.updateSlot(e.equipItems), (this.nameLab.string = o.GameText.getTextByStr(e.cfg.name));
- }
- };
- e([l({type: cc.Node})], t.prototype, "equipCostumeNode", void 0),
- e([l(cc.Node)], t.prototype, "mainCatNode", void 0),
- e([l({type: cc.Label})], t.prototype, "nameLab", void 0),
- (t = e([r], t)),
- (i.default = t);
|