UIFirstPack.ts 878 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { UIPopup } from '@scripts/framework/ui/UIPopup';
  2. import { addBtnClick } from '@scripts/utils/UIHelper';
  3. import { _decorator, Button, Component, Label, Node } from 'cc';
  4. const { ccclass, property } = _decorator;
  5. @ccclass('UIFirstPack')
  6. export class UIFirstPack extends UIPopup {
  7. @property(Label)
  8. lblGC: Label;
  9. @property(Label)
  10. lblSC: Label;
  11. @property(Label)
  12. lblVIP: Label;
  13. @property(Button)
  14. btnClose: Button;
  15. @property(Button)
  16. btnPay: Button;
  17. protected onCreate(): void | Promise<void> {
  18. addBtnClick(this.btnClose, this.closeSelf, this);
  19. addBtnClick(this.btnPay, this.onBtnPayClick, this);
  20. }
  21. private onBtnPayClick() {
  22. }
  23. protected onOpen(_params: unknown): void | Promise<void> {
  24. this.lblGC.string = "";
  25. this.lblSC.string = "";
  26. this.lblVIP.string = "";
  27. }
  28. }