ecb4190f-4737-4753-946a-2935bcc28037.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. "use strict";
  2. cc._RF.push(module, 'ecb41kPRzdHU5RqKTW8woA3', 'MissionPanel');
  3. // Script/view/missionPanel/MissionPanel.ts
  4. "use strict";
  5. var __extends = (this && this.__extends) || (function () {
  6. var extendStatics = function (d, b) {
  7. extendStatics = Object.setPrototypeOf ||
  8. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  9. function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  10. return extendStatics(d, b);
  11. };
  12. return function (d, b) {
  13. extendStatics(d, b);
  14. function __() { this.constructor = d; }
  15. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  16. };
  17. })();
  18. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  19. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  20. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  21. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  22. return c > 3 && r && Object.defineProperty(target, key, r), r;
  23. };
  24. Object.defineProperty(exports, "__esModule", { value: true });
  25. var BaseView_1 = require("../../../lightMVC/core/base/BaseView");
  26. var App_1 = require("../../Manager/App");
  27. var SuperScrollView_1 = require("../SuperScrollview/SuperScrollView");
  28. var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
  29. var MissionPanel = /** @class */ (function (_super) {
  30. __extends(MissionPanel, _super);
  31. function MissionPanel() {
  32. var _this = _super !== null && _super.apply(this, arguments) || this;
  33. _this.skinNum = 6;
  34. _this.currentNum = 1;
  35. _this.list = [];
  36. return _this;
  37. }
  38. MissionPanel.prototype.drawView = function () {
  39. var _this = this;
  40. for (var i = 0; i < App_1.App.DataManager.MissionDataList.length; i++) {
  41. this.list[i] = i;
  42. }
  43. // 返回
  44. var closeBtn = this.ui.getNode("close");
  45. closeBtn.on(cc.Node.EventType.TOUCH_END, function () {
  46. _this.closeView();
  47. }, this);
  48. this.CreateLevel();
  49. this.ui.getNode("item").active = false;
  50. };
  51. /**
  52. * 生成皮肤列表
  53. */
  54. MissionPanel.prototype.CreateLevel = function () {
  55. var skinList = this.ui.getNode("List");
  56. skinList.getComponent(SuperScrollView_1.default).setData(this.list, false, null);
  57. };
  58. MissionPanel.path = function () {
  59. return "hallScene/prefabs/MissionPanel";
  60. };
  61. MissionPanel = __decorate([
  62. ccclass
  63. ], MissionPanel);
  64. return MissionPanel;
  65. }(BaseView_1.BaseView));
  66. exports.default = MissionPanel;
  67. cc._RF.pop();