CostumeCoinReturnView.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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});
  17. const s = t("App"),
  18. o = t("BaseView"),
  19. a = t("EffectUtils"),
  20. n = t("BagController"),
  21. {ccclass: r, property: l} = cc._decorator;
  22. t = class extends o.default {
  23. constructor() {
  24. super(...arguments),
  25. (this.diamondCntLab = null),
  26. (this.diamondIcon = null),
  27. (this.bgType = 1),
  28. (this.item = null);
  29. }
  30. initUI() {
  31. super.initUI();
  32. }
  33. open(t) {
  34. super.open(), (this.num = t), (this.diamondCntLab.string = "" + t);
  35. }
  36. playDiamonAni() {
  37. if (this.num) {
  38. const i = s.default.ViewManager.uiRoot;
  39. var t = this.node.convertToWorldSpaceAR(cc.Vec2.ZERO),
  40. t = i.convertToNodeSpaceAR(t),
  41. e = this.diamondIcon.convertToWorldSpaceAR(cc.Vec2.ZERO),
  42. e = i.convertToNodeSpaceAR(e);
  43. a.default.instance.playMoneyAni(t, e, n.CostType.diamond, i, this.num);
  44. }
  45. }
  46. onTouchClose() {
  47. super.onTouchClose(), this.playDiamonAni();
  48. }
  49. };
  50. e([l({type: cc.Label})], t.prototype, "diamondCntLab", void 0),
  51. e([l({type: cc.Node})], t.prototype, "diamondIcon", void 0),
  52. (t = e([r], t)),
  53. (i.default = t);