CashProPanel.ts 845 B

123456789101112131415161718192021222324252627282930313233343536
  1. import GameM, { AUDIO_TYPE, VIDEO_TYPE } from "../manager/GameM";
  2. import BasePanel from "../uiFrames/BasePanel";
  3. const { ccclass, property } = cc._decorator;
  4. @ccclass
  5. export default class CashProPanel extends BasePanel {
  6. @property(cc.Label)
  7. txtNum: cc.Label = null;
  8. //@property(cc.Node)
  9. //panelNode: cc.Node = null;
  10. OnEnter(price: number) {
  11. this.txtNum.string = "¥" + price;
  12. //this.panelNode.scale = 0;
  13. this.node.active = true;
  14. //cc.tween(this.panelNode).to(0.2, { scale: 1 }, { easing: "backOut" })
  15. // .call(() => {
  16. //
  17. // })
  18. // .start();
  19. }
  20. OnExit() {
  21. this.node.active = false;
  22. }
  23. Click_BackBtn() {
  24. this.OnExit();
  25. GameM.audioM.playEffect(AUDIO_TYPE.button);
  26. }
  27. }