LoginScene.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. var t = require;
  2. var e = module;
  3. var i = exports;
  4. var 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. s =
  17. (this && this.__awaiter) ||
  18. function(t, n, r, l) {
  19. return new(r = r || Promise)(function(i, e) {
  20. function s(t) {
  21. try {
  22. a(l.next(t));
  23. } catch (t) {
  24. e(t);
  25. }
  26. }
  27. function o(t) {
  28. try {
  29. a(l.throw(t));
  30. } catch (t) {
  31. e(t);
  32. }
  33. }
  34. function a(t) {
  35. var e;
  36. t.done ?
  37. i(t.value) :
  38. ((e = t.value) instanceof r ?
  39. e :
  40. new r(function(t) {
  41. t(e);
  42. })
  43. ).then(s, o);
  44. }
  45. a((l = l.apply(t, n || [])).next());
  46. });
  47. };
  48. Object.defineProperty(i, "__esModule", { value: !0 });
  49. const o = t("App"),
  50. a = t("BaseScene"),
  51. n = t("GameText"),
  52. r = t("ControllerConst"),
  53. l = t("ADController"),
  54. h = t("LoadingController"),
  55. c = t("Platform"),
  56. d = t("SceneConst"),
  57. { ccclass: u, property: p } = cc._decorator;
  58. t = class extends a.default {
  59. constructor() {
  60. super(...arguments),
  61. (this.sceneName = d.SceneTag.LOGIN),
  62. (this.loadingViewPrefab = null),
  63. (this.SubProjectCfg = null),
  64. (this.subCfg = null);
  65. }
  66. onEnter() {
  67. const t = Object.create(null, { onEnter: { get: () => super.onEnter } });
  68. return s(this, void 0, void 0, function*() {
  69. t.onEnter.call(this);
  70. 0.62 < cc.winSize.height / cc.winSize.width && (this.node.getComponent(cc.Canvas).fitWidth = !0);
  71. Log.trace("初始化平台类"), c.Platform.init(), yield n.GameText.init(), this.initModule();
  72. });
  73. }
  74. initModule() {
  75. o.default.ControllerManager.register(r.ControllerConst.Loading, h.default),
  76. o.default.ControllerManager.register(r.ControllerConst.AD, l.ADController);
  77. }
  78. };
  79. e([p(cc.Prefab)], t.prototype, "loadingViewPrefab", void 0),
  80. e([p(cc.JsonAsset)], t.prototype, "SubProjectCfg", void 0),
  81. e([p({ type: cc.JsonAsset })], t.prototype, "subCfg", void 0),
  82. (t = e([u], t)),
  83. (i.default = t);