FightUpPanel.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Learn TypeScript:
  2. // - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
  3. // Learn Attribute:
  4. // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
  5. // Learn life-cycle callbacks:
  6. // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
  7. import BasePanel from "../uiFrames/BasePanel";
  8. import UIMng, { PanelType } from "../uiFrames/UIMng";
  9. const { ccclass, property } = cc._decorator;
  10. @ccclass
  11. export default class FightUpPanel extends BasePanel {
  12. @property(cc.Node)
  13. panelNode: cc.Node = null;
  14. OnEnter() {
  15. this.panelNode.scale = 0;
  16. this.node.active = true;
  17. cc.tween(this.panelNode).to(0.2, { scale: 1 }, { easing: "backOut" })
  18. .call(() => {
  19. })
  20. .start();
  21. }
  22. OnExit() {
  23. this.node.active=false;
  24. }
  25. Click_CloseBtn(){
  26. this.OnExit();
  27. }
  28. Click_LvUpTalentBtn(){
  29. this.OnExit();
  30. UIMng.Ins.AsyncGetPanel(PanelType.MatePanel, (panel) => {
  31. panel.OnEnter({mateid:2});
  32. });
  33. //UIMng.Ins.GetPanel(PanelType.MatePanel).OnEnter({mateid:2});
  34. }
  35. }