1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- 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("BaseView"),
- o = t("ShopConst"),
- a = t("ShopBuffItem"),
- { property: n, ccclass: r, menu: l } = cc._decorator;
- t = class extends s.default {
- constructor() {
- super(...arguments),
- (this.content = null),
- (this.item = null),
- (this.controller = null),
- (this.bgType = 1),
- (this.shopItems = []);
- }
- initUI() {
- super.initUI();
- var s = this.controller.model.shopItemDatas[o.ShopType.BUFF];
- console.error(s);
- console.error(o.ShopType.BUFF);
- for (let i = 0; i < s.length; i++) {
- this.shopItems || (this.shopItems = []);
- let t = cc.instantiate(this.item);
- this.content.addChild(t);
- let e = t.getComponent(a.ShopBuffItem);
- e.setData(s[i]), e.showItem(), this.shopItems.push(e);
- }
- this.item.destroy();
- }
- open() {
- super.open(),
- this.shopItems.forEach(t => {
- t.updateBuffState();
- });
- }
- updateTime(e) {
- this.shopItems.forEach(t => {
- t.updateTime(e);
- });
- }
- };
- e([n(cc.Node)], t.prototype, "content", void 0),
- e([n(cc.Node)], t.prototype, "item", void 0),
- (t = e([r, l("view/Shop/ShopBuffView")], t)),
- (i.default = t);
|