ShopItem.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. var t = require;
  2. var e = module;
  3. var i = exports;
  4. e =
  5. (this && this.__decorate) ||
  6. function (t, e, i, s) {
  7. var o,
  8. a = arguments.length,
  9. n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s;
  10. if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s);
  11. else
  12. for (var r = t.length - 1; 0 <= r; r--)
  13. (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n);
  14. return 3 < a && n && Object.defineProperty(e, i, n), n;
  15. };
  16. Object.defineProperty(i, "__esModule", {value: !0}), (i.ShopItem = void 0);
  17. const s = t("App"),
  18. o = t("ControllerConst"),
  19. a = t("ShopConst"),
  20. {property: n, ccclass: r, menu: l} = cc._decorator;
  21. t = class extends cc.Component {
  22. constructor() {
  23. super(...arguments), (this.content = null), (this.icon = null), (this.costLab = null), (this.isShow = !1);
  24. }
  25. setData(t) {
  26. this.data = t;
  27. }
  28. updateItem() {}
  29. initItem() {}
  30. showItem() {
  31. (this.content.active = !0), this.isShow || this.initItem();
  32. }
  33. hideItem() {
  34. this.content.active = !1;
  35. }
  36. updateTime(t) {}
  37. onTouchBuyBtn() {
  38. s.default.ControllerManager.applyFunc(o.ControllerConst.Shop, a.ShopConst.BUY, this.data);
  39. }
  40. onTouchUseBtn() {}
  41. };
  42. e([n(cc.Node)], t.prototype, "content", void 0),
  43. e([n(cc.Sprite)], t.prototype, "icon", void 0),
  44. e([n(cc.Label)], t.prototype, "costLab", void 0),
  45. (t = e([r, l("view/Shop/ShopItem")], t)),
  46. (i.ShopItem = t);