123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- 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}), (i.ShopGiftContent = void 0);
- const o = t("ShopGiftItem"),
- s = t("ShopContent"),
- {property: a, ccclass: n, menu: r} = cc._decorator;
- t = class extends s.ShopContent {
- constructor() {
- super(...arguments), (this.pageView = null), (this.items = null);
- }
- setData(t) {
- (this.items = []), (this.datas = t);
- }
- initContent() {
- let i = 0;
- if (this.itemPre)
- for (const s of this.datas)
- if (s.isShowInShopView()) {
- let t = cc.instantiate(this.itemPre);
- this.pageView.addPage(t);
- let e = t.getComponent(o.ShopGiftItem);
- e.setData(s), this.items.push(e), i++;
- }
- i || (this.node.active = !1);
- }
- updateUI() {
- for (let t = this.items.length - 1; 0 <= t; t--) {
- const e = this.items[t];
- if (e.isRemove()) {
- this.pageView.removePage(e.node), this.items.remove(e);
- break;
- }
- }
- this.items.length || (this.node.active = !1);
- }
- showContent() {
- this.content.active = !0;
- for (const t of this.items) t.showItem();
- }
- hideContent() {
- this.content.active = !1;
- }
- onPageView(t, e, i) {}
- };
- e([a(cc.PageView)], t.prototype, "pageView", void 0),
- (t = e([n, r("view/Shop/ShopGiftContent")], t)),
- (i.ShopGiftContent = t);
|