LineUpUI.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { VideoAdType } from "../../data/GameData";
  2. const { ccclass, property } = cc._decorator;
  3. @ccclass
  4. export default class LineUpUI extends cc.Component {
  5. @property(cc.Label)
  6. private lbl_tip: cc.Label = null;
  7. start() {
  8. gData.lineUpUIData.refresh = false;
  9. this.lbl_tip.string = `提现排队中,你前面还有${gData.lineUpUIData.personCount}人`;
  10. }
  11. update(dt) {
  12. if (gData.lineUpUIData.refresh) {
  13. console.log('lineUp=====>', gData.lineUpUIData.personCount);
  14. gData.lineUpUIData.refresh = false;
  15. this.lbl_tip.string = `提现排队中,你前面还有${gData.lineUpUIData.personCount}人`;
  16. }
  17. }
  18. private clickVideoBtn() {
  19. mk.audio.playEffect("button");
  20. // 看广告
  21. mk.ad.watchAd((success: boolean) => {
  22. mk.console.log("watchAD:" + success);
  23. if (success) {
  24. mk.tip.pop('插队成功');
  25. mk.ad.videoAdType = VideoAdType.video_init_20;
  26. gData.adData.watchVideo(null);
  27. //gData.walletCashOutData.HttpCashOut2(gData.lineUpUIData.cashId);
  28. }
  29. });
  30. }
  31. private clickCloseBtn() {
  32. mk.audio.playEffect("button");
  33. }
  34. }