PopOutPanelView.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { BaseView } from "../../../lightMVC/core/base/BaseView";
  2. import { App } from "../../Manager/App";
  3. const {ccclass, property} = cc._decorator;
  4. @ccclass
  5. export default class PopOutPanelView extends BaseView {
  6. public static readonly UPDATE_LEVEL = "UPDATE_LEVEL";
  7. public drawView (): void {
  8. // 关闭按钮
  9. let closeBtn = this.ui.getNode("close_button");
  10. closeBtn.on(cc.Node.EventType.TOUCH_END, ()=>{
  11. //this.node.parent.getChildByName("blackBg").destroy();
  12. this.closeView();
  13. }, this);
  14. let out_rule = this.ui.getNode("out_rule");
  15. out_rule.on(cc.Node.EventType.TOUCH_END, ()=>{
  16. // App.Facade.popView(RulePanelMediator, RulePanel, "规则", true);
  17. }, this);
  18. this.xunlian();
  19. this.work();
  20. }
  21. public setLevelDisplay(lv: number): void {
  22. let levelLabel = this.ui.getComponent("des_label", cc.Label);
  23. levelLabel.string = "当前等级为:" + lv;
  24. }
  25. //训练
  26. private xunlian(){
  27. let xunlian = this.ui.getNode("xunlian");
  28. let join = xunlian.getChildByName("out_join");
  29. join.on(cc.Node.EventType.TOUCH_END, ()=>{
  30. App.TipsManager.showmid("功能暂未开放,敬请期待");
  31. }, this);
  32. }
  33. //训练
  34. private work(){
  35. let work = this.ui.getNode("work");
  36. let join = work.getChildByName("out_join");
  37. join.on(cc.Node.EventType.TOUCH_END, ()=>{
  38. App.TipsManager.showmid("功能暂未开放,敬请期待");
  39. }, this);
  40. }
  41. public static path(): string {
  42. return "prefabs/PopOutPanel";
  43. }
  44. }