NodePoolMsr.js 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. var t = require;
  2. var e = module;
  3. var i = exports;
  4. var s,
  5. e =
  6. (this && this.__decorate) ||
  7. function(t, e, i, s) {
  8. var o,
  9. a = arguments.length,
  10. n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s;
  11. if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s);
  12. else
  13. for (var r = t.length - 1; 0 <= r; r--)
  14. (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n);
  15. return 3 < a && n && Object.defineProperty(e, i, n), n;
  16. };
  17. Object.defineProperty(i, "__esModule", { value: !0 });
  18. const o = t("App"),
  19. a = t("NodePool"),
  20. { ccclass: n, property: r } = cc._decorator;
  21. t = s = class extends cc.Component {
  22. constructor() {
  23. super(),
  24. (this.flyLabel = null),
  25. (this.itemPool = null),
  26. (this.baseBtnPool = null),
  27. (this.tipAniPool = null),
  28. (this.getCoinEffect = null),
  29. (this.moneyLabPool = null),
  30. (this.multiSprMaterial = null),
  31. (this.passSectionFoodPool = null),
  32. (this.cookUnlockAni = null),
  33. (this.catUnlockAni = null),
  34. (this.machineLvUpAni = null),
  35. (this.congratulationItem = null),
  36. (this.catLefttimeProgressPool = null),
  37. (this.roleLangPool = null),
  38. (this.fireAniPool = null),
  39. (this.poolsPromise = {}),
  40. (this._handGuidePoolPromise = null),
  41. (s.instance = this),
  42. (o.default.NodePoolMsr = this);
  43. }
  44. onLoad() {
  45. cc.game.addPersistRootNode(this.node);
  46. }
  47. getPoolByUrl(t) {
  48. return (
  49. this.poolsPromise[t] ||
  50. ((this.poolsPromise[t] = o.default.ResManager.getResAsync(t, cc.Prefab).then(t => {
  51. const e = new a.default();
  52. return (e.prefab = t), e;
  53. })),
  54. this.poolsPromise[t])
  55. );
  56. }
  57. getHandGuidePool() {
  58. return (
  59. this._handGuidePoolPromise ||
  60. ((this._handGuidePoolPromise = o.default.ResManager.getResAsync(
  61. "prefab/view/component/HandGuide",
  62. cc.Prefab
  63. ).then(t => {
  64. const e = new a.default();
  65. return (e.prefab = t), e;
  66. })),
  67. this._handGuidePoolPromise)
  68. );
  69. }
  70. };
  71. (t.instance = null),
  72. e([r(a.default)], t.prototype, "flyLabel", void 0),
  73. e([r(a.default)], t.prototype, "itemPool", void 0),
  74. e([r(a.default)], t.prototype, "baseBtnPool", void 0),
  75. e([r(a.default)], t.prototype, "tipAniPool", void 0),
  76. e([r(a.default)], t.prototype, "getCoinEffect", void 0),
  77. e([r(a.default)], t.prototype, "moneyLabPool", void 0),
  78. e([r(cc.Material)], t.prototype, "multiSprMaterial", void 0),
  79. e([r(a.default)], t.prototype, "passSectionFoodPool", void 0),
  80. e([r(a.default)], t.prototype, "cookUnlockAni", void 0),
  81. e([r(a.default)], t.prototype, "catUnlockAni", void 0),
  82. e([r(a.default)], t.prototype, "machineLvUpAni", void 0),
  83. e([r(a.default)], t.prototype, "congratulationItem", void 0),
  84. e([r(a.default)], t.prototype, "catLefttimeProgressPool", void 0),
  85. e([r(a.default)], t.prototype, "roleLangPool", void 0),
  86. e([r(a.default)], t.prototype, "fireAniPool", void 0),
  87. (t = s = e([n], t)),
  88. (i.default = t = s);