HelperCatInfoView.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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("BaseView"),
  18. o = t("CountDownLab"),
  19. a = (t("ViewConst"), t("LayerManager"), t("HelperCatInfoItem")),
  20. n = t("HelperCatService"),
  21. {ccclass: r, property: l} = cc._decorator;
  22. t = class extends s.default {
  23. constructor() {
  24. super(...arguments),
  25. (this.emptyNode = null),
  26. (this.nromalNode = null),
  27. (this.helperCatInfoItem = null),
  28. (this.countDownLab = null),
  29. (this.bgType = 1);
  30. }
  31. open() {
  32. super.open();
  33. var t = n.default.ins.getState();
  34. t === n.HelperCatState.READY
  35. ? this.onTouchClose()
  36. : t === n.HelperCatState.CD
  37. ? ((this.emptyNode.active = !0), (this.nromalNode.active = !1))
  38. : t === n.HelperCatState.WORKING &&
  39. ((this.emptyNode.active = !1),
  40. (this.nromalNode.active = !0),
  41. this.helperCatInfoItem.setData(n.default.ins.curHelprCatData),
  42. this.countDownLab.setEndTime(
  43. n.default.ins.saveData.hireTime + 1e3 * n.default.ins.define.invite_appear_timer
  44. ),
  45. this.countDownLab.startCount());
  46. }
  47. initUI() {
  48. super.initUI();
  49. }
  50. close() {
  51. super.close();
  52. }
  53. };
  54. (t.VIEW_INFO = {prefabName: "HelperCatInfoView", zIndex: 100, key: 42, dir: "helpercat"}),
  55. e([l({type: cc.Node})], t.prototype, "emptyNode", void 0),
  56. e([l({type: cc.Node})], t.prototype, "nromalNode", void 0),
  57. e([l(a.default)], t.prototype, "helperCatInfoItem", void 0),
  58. e([l(o.default)], t.prototype, "countDownLab", void 0),
  59. (t = e([r], t)),
  60. (i.default = t);