/* * @Author: mojunshou 1637302775@qq.com * @Date: 2025-03-21 11:45:43 * @LastEditors: mojunshou 1637302775@qq.com * @LastEditTime: 2025-04-16 14:44:54 * @Description: 提现必返 */ import { _decorator, Label } from 'cc'; import { oops } from 'db://oops-framework/core/Oops'; import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil'; import { GameComponent } from "db://oops-framework/module/common/GameComponent"; import { UIID } from '../common/config/GameUIConfig'; import { CocosHandler } from '../common/manager/CocosHandler'; import { ADHandler } from '../common/manager/ADHandler'; import { smc } from '../common/SingletonModuleComp'; import { GameEvent } from '../common/config/GameEvent'; import { ServerHandler } from '../common/manager/ServerHandler'; const { ccclass, property } = _decorator; /** 显示对象控制 */ @ccclass('CashRebateView') export class CashRebateView extends GameComponent { @property(Label) lab_num: Label = null!; protected start() { this.setButton(); this.setData(); } setData() { if (this.lab_num) { this.lab_num.string = smc.game.GameModel.cashNum + ""; } } private btn_ok() { //看广告 if (DeviceUtil.isNative && DeviceUtil.isAndroid) { oops.gui.remove(UIID.CashRebate); ADHandler.inst.showAd("105"); oops.message.dispatchEvent(GameEvent.showCoinAnimation, "showCoin"); //下一关 ServerHandler.inst.getNextLevel(); } else { oops.gui.remove(UIID.CashRebate); } } }