061af103-452f-442b-b830-9d61a2667e2a.js 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. "use strict";
  2. cc._RF.push(module, '061afEDRS9EK7gwnWGiZn4q', 'ChooseSkinPanel');
  3. // Script/view/chooseSkin/ChooseSkinPanel.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 ChooseSkinPanel = /** @class */ (function (_super) {
  30. __extends(ChooseSkinPanel, _super);
  31. function ChooseSkinPanel() {
  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. ChooseSkinPanel.prototype.drawView = function () {
  39. var _this = this;
  40. App_1.App.DataManager.GetNewSkinFlag = false;
  41. this.list = App_1.App.DataManager.SkinDataList;
  42. // 返回
  43. var closeBtn = this.ui.getNode("close");
  44. closeBtn.on(cc.Node.EventType.TOUCH_END, function () {
  45. _this.closeView();
  46. }, this);
  47. this.CreateLevel();
  48. this.scheduleOnce(function () { App_1.App.DataManager.NewSkinName = ''; }, 0);
  49. };
  50. /**
  51. * 生成皮肤列表
  52. */
  53. ChooseSkinPanel.prototype.CreateLevel = function () {
  54. var skinList = this.ui.getNode("skinList");
  55. skinList.getComponent(SuperScrollView_1.default).setData(this.list, false, null);
  56. };
  57. ChooseSkinPanel.path = function () {
  58. return "hallScene/prefabs/ChooseSkinPanel";
  59. };
  60. ChooseSkinPanel = __decorate([
  61. ccclass
  62. ], ChooseSkinPanel);
  63. return ChooseSkinPanel;
  64. }(BaseView_1.BaseView));
  65. exports.default = ChooseSkinPanel;
  66. cc._RF.pop();