DoubleRewardsView.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 15:23:44
  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. const { ccclass, property } = _decorator;
  18. /** 显示对象控制 */
  19. @ccclass('DoubleRewardsView')
  20. export class DoubleRewardsView extends GameComponent {
  21. @property([Label])
  22. lab_list: Label[] = [];
  23. @property(Label)
  24. lab_title: Label = null!;
  25. @property(Label)
  26. lab_tips: Label = null!; //已经赚XXX
  27. @property(Node)
  28. tips_node1: Node = null!; //进度条
  29. @property(Node)
  30. tips_node2: Node = null!;
  31. @property(ProgressBar)
  32. pro_loadBar1: ProgressBar = null!;
  33. @property(ProgressBar)
  34. pro_loadBar2: ProgressBar = null!;
  35. protected start() {
  36. this.setButton();
  37. }
  38. btn_alittle() {
  39. // ServerHandler.inst.getLittleRewards();
  40. oops.gui.remove(UIID.DoubleRewards);
  41. //插屏广告
  42. ADHandler.inst.showAd(AD_TYPE.Double_Close);
  43. }
  44. btn_all() {
  45. ADHandler.inst.showAd(AD_TYPE.Double_Receive);
  46. oops.gui.remove(UIID.DoubleRewards);
  47. }
  48. //算出底部进度条位置
  49. }