ShopNormalItem.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  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.ShopNormalItem = void 0);
  17. const s = t("App"),
  18. {property: o, ccclass: a, menu: n} = cc._decorator;
  19. t = class extends cc.Component {
  20. constructor() {
  21. super(...arguments), (this.iconSpr = null), (this.nameLab = null);
  22. }
  23. setData(t, e) {
  24. (this.nameLab.string = e), s.default.CommonUtils.setSpriteFrame(t, this.iconSpr);
  25. }
  26. hide() {
  27. this.node.active = !1;
  28. }
  29. show() {
  30. this.node.active = !0;
  31. }
  32. };
  33. e([o(cc.Sprite)], t.prototype, "iconSpr", void 0),
  34. e([o(cc.Label)], t.prototype, "nameLab", void 0),
  35. (t = e([a, n("view/Shop/ShopNormalItem")], t)),
  36. (i.ShopNormalItem = t);