GodArrow.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. o =
  18. (this && this.__awaiter) ||
  19. function(t, n, r, l) {
  20. return new(r = r || Promise)(function(i, e) {
  21. function s(t) {
  22. try {
  23. a(l.next(t));
  24. } catch (t) {
  25. e(t);
  26. }
  27. }
  28. function o(t) {
  29. try {
  30. a(l.throw(t));
  31. } catch (t) {
  32. e(t);
  33. }
  34. }
  35. function a(t) {
  36. var e;
  37. t.done ?
  38. i(t.value) :
  39. ((e = t.value) instanceof r ?
  40. e :
  41. new r(function(t) {
  42. t(e);
  43. })
  44. ).then(s, o);
  45. }
  46. a((l = l.apply(t, n || [])).next());
  47. });
  48. };
  49. Object.defineProperty(i, "__esModule", { value: !0 });
  50. const a = t("App"),
  51. { property: n, ccclass: r, menu: l } = cc._decorator;
  52. t = s = class extends cc.Component {
  53. constructor() {
  54. super(...arguments), (this.desc = null), (this.img = null);
  55. }
  56. static newInstance() {
  57. return o(this, void 0, void 0, function*() {
  58. var t = yield AssetManager.instance.autoLoadAssetAsync(s.ASSET_REQUEST);
  59. return cc.instantiate(t).getComponent(s);
  60. });
  61. }
  62. setLabel(t) {
  63. t
  64. ?
  65. (this.img && (this.img.node.active = !0), a.default.CommonUtils.setSpriteFrame("Font/" + t, this.img)) :
  66. this.img && (this.img.node.active = !1);
  67. }
  68. dispose() {
  69. this.node.removeFromParent(), this.destroy();
  70. }
  71. };
  72. (t.ASSET_REQUEST = { url: "prefab/view/guide/GodArrow", clazz: cc.Prefab, cache: !0, local: !0 }),
  73. e([n(cc.Label)], t.prototype, "desc", void 0),
  74. e([n(cc.Sprite)], t.prototype, "img", void 0),
  75. (t = s = e([r], t)),
  76. (i.default = t = s);