| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /*
- * @Author: mojunshou 1637302775@qq.com
- * @Date: 2025-03-21 11:17:22
- * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-16 11:05:39
- * @Description: 二倍速弹窗
- */
- import { _decorator, Label, RichText } from "cc";
- import { oops } from "db://oops-framework/core/Oops";
- import { ecs } from "db://oops-framework/libs/ecs/ECS";
- import { CCComp } from "db://oops-framework/module/common/CCComp";
- import { AD_TYPE } from "../common/config/GameDefine";
- import { UIID } from "../common/config/GameUIConfig";
- import { ADHandler } from "../common/manager/ADHandler";
- import { smc } from "../common/SingletonModuleComp";
- import VMParent from "db://oops-framework/libs/model-view/VMParent";
- const { ccclass, property } = _decorator;
- /** 视图层对象 */
- @ccclass('DoubleSpeedViewComp')
- export class DoubleSpeedViewComp extends VMParent {
- /** 视图层逻辑代码分离演示 */
- data: any = {
- time: 0,
- }
- start() {
- // const entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
- this.setButton();
- this.data.time = smc.game.GameModel.doubleSpeedTime;
- }
- private btn_open() {
- this.openAd();
- oops.gui.remove(UIID.DoubleSpeed);
- }
- //打开广告
- private openAd() {
- smc.game.GameModel.viewType = "speed_reward";
- ADHandler.inst.showAd(AD_TYPE.Double_Speed_Receive);
- }
- private btn_no() {
- oops.gui.remove(UIID.DoubleSpeed);
- ADHandler.inst.showAd("107");
- }
- private btn_close() {
- oops.gui.remove(UIID.DoubleSpeed);
- //播放插屏广告
- ADHandler.inst.showAd("107");
- }
- }
|