GameLoadingView.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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("GameText"),
  19. a = t("BaseView"),
  20. n = t("GameConst"),
  21. { ccclass: r, property: l, menu: h } = cc._decorator;
  22. t = class extends a.default {
  23. constructor() {
  24. super(...arguments),
  25. (this.curIconSpr = null),
  26. (this.curNameLab = null),
  27. (this.nextNameLab = null),
  28. (this.nextIconSpr = null),
  29. (this.arrowNode = null),
  30. (this.arrowArray = []),
  31. (this.arrowTime = 0.5),
  32. (this.arrowIndex = 0),
  33. (this.bgType = 1),
  34. (this.closeType = 2);
  35. }
  36. open(t) {
  37. super.open();
  38. var e = s.default.ConfigManager.getConfig("StageSet")[t],
  39. t = s.default.ConfigManager.getConfig("StageSet")[t + 1];
  40. (this.curNameLab.string = o.GameText.getTextByStr(e.stage_name)),
  41. (this.nextNameLab.string = o.GameText.getTextByStr(t.stage_name)),
  42. s.default.CommonUtils.setSpriteFrameByBundle(
  43. n.BundleType.MAP_ICON,
  44. "stage/" + e.stage_icon,
  45. this.curIconSpr
  46. ),
  47. s.default.CommonUtils.setSpriteFrameByBundle(
  48. n.BundleType.MAP_ICON,
  49. "stage/" + t.stage_icon,
  50. this.nextIconSpr
  51. );
  52. }
  53. update(t) {
  54. (this.arrowTime -= t),
  55. this.arrowTime <= 0 &&
  56. ((this.arrowTime = 0.5),
  57. this.arrowIndex++,
  58. (t = this.arrowIndex % 3),
  59. (this.arrowNode.x = this.arrowArray[t].x),
  60. (this.arrowNode.y = this.arrowArray[t].y));
  61. }
  62. };
  63. e([l(cc.Sprite)], t.prototype, "curIconSpr", void 0),
  64. e([l(cc.Label)], t.prototype, "curNameLab", void 0),
  65. e([l(cc.Label)], t.prototype, "nextNameLab", void 0),
  66. e([l(cc.Sprite)], t.prototype, "nextIconSpr", void 0),
  67. e([l(cc.Node)], t.prototype, "arrowNode", void 0),
  68. e([l([cc.Node])], t.prototype, "arrowArray", void 0),
  69. (t = e([r], t)),
  70. (i.default = t);