DoubleRewardsView.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * @Author: mojunshou 1637302775@qq.com
  3. * @Date: 2025-03-21 11:57:43
  4. * @LastEditors: mojunshou 1637302775@qq.com
  5. * @LastEditTime: 2025-04-11 17:47:06
  6. * @Description: 惊喜翻倍弹窗
  7. */
  8. import { Label, Node } from 'cc';
  9. import { _decorator } from 'cc';
  10. import { GameComponent } from "db://oops-framework/module/common/GameComponent";
  11. import { ServerHandler } from '../common/manager/ServerHandler';
  12. import { oops } from 'db://oops-framework/core/Oops';
  13. import { UIID } from '../common/config/GameUIConfig';
  14. import { ADHandler } from '../common/manager/ADHandler';
  15. import { AD_TYPE } from '../common/config/GameDefine';
  16. import { ProgressBar } from 'cc';
  17. import { smc } from '../common/SingletonModuleComp';
  18. const { ccclass, property } = _decorator;
  19. /** 显示对象控制 */
  20. @ccclass('DoubleRewardsView')
  21. export class DoubleRewardsView extends GameComponent {
  22. @property([Label])
  23. lab_list: Label[] = [];
  24. @property(Label)
  25. lab_title: Label = null!;
  26. @property(Label)
  27. lab_tips: Label = null!; //已经赚XXX
  28. @property(Node)
  29. tips_node1: Node = null!; //进度条
  30. @property(Node)
  31. tips_node2: Node = null!;
  32. @property(ProgressBar)
  33. pro_loadBar1: ProgressBar = null!;
  34. @property(ProgressBar)
  35. pro_loadBar2: ProgressBar = null!;
  36. protected start() {
  37. this.setButton();
  38. }
  39. btn_alittle() {
  40. // ServerHandler.inst.getLittleRewards();
  41. oops.gui.remove(UIID.DoubleRewards);
  42. //插屏广告
  43. ADHandler.inst.showAd(AD_TYPE.Double_Close);
  44. }
  45. btn_all() {
  46. smc.game.GameModel.viewType = "double_reward";
  47. ADHandler.inst.showAd(AD_TYPE.Double_Receive);
  48. oops.gui.remove(UIID.DoubleRewards);
  49. }
  50. //算出底部进度条位置
  51. }