MissionPanel.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { BaseView } from "../../../lightMVC/core/base/BaseView";
  2. import { App } from "../../Manager/App";
  3. import { Sex } from "../../Framework/Const/EnumDefine";
  4. import SuperScrollView from "../SuperScrollview/SuperScrollView";
  5. import MissionItem from "./MissionItem";
  6. const { ccclass, property } = cc._decorator;
  7. @ccclass
  8. export default class MissionPanel extends BaseView {
  9. private skinNum: number = 6;
  10. private currentNum: number = 1;
  11. private list: any[] = [];
  12. public drawView(): void {
  13. for (let i = 0; i < App.DataManager.MissionDataList.length; i++) {
  14. this.list[i] = i;
  15. }
  16. // 返回
  17. let closeBtn = this.ui.getNode("close");
  18. closeBtn.on(cc.Node.EventType.TOUCH_END, () => {
  19. this.closeView();
  20. }, this);
  21. this.CreateLevel();
  22. this.ui.getNode("item").active = false;
  23. }
  24. /**
  25. * 生成皮肤列表
  26. */
  27. private CreateLevel(): void {
  28. let skinList = this.ui.getNode("List");
  29. skinList.getComponent(SuperScrollView).setData(this.list, false, null);
  30. }
  31. public static path(): string {
  32. return "hallScene/prefabs/MissionPanel";
  33. }
  34. }