| 123456789101112131415161718192021222324252627282930313233343536373839 |
- /*
- * @Author: mojunshou 1637302775@qq.com
- * @Date: 2025-03-19 17:46:09
- * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-10 15:31:35
- * @Description: 用户协议和隐私协议点击事件
- */
- import { sys } from 'cc';
- import { _decorator, EventTouch } from 'cc';
- import { oops } from 'db://oops-framework/core/Oops';
- import { GameComponent } from "db://oops-framework/module/common/GameComponent";
- import { CocosHandler } from '../manager/CocosHandler';
- import { smc } from '../SingletonModuleComp';
- import { LoginHandler } from '../manager/LoginHandler';
- const { ccclass, property } = _decorator;
- /** 显示对象控制 */
- @ccclass('ClickEventHandler')
- export class ClickEventHandler extends GameComponent {
- onClicked(eventTouch: EventTouch, param: string) {
- console.log("onClicked", param);
- switch (param) {
- case "User Agreement":
- // 在游戏内打开用户协议
- // sys.openURL("https://store.cocos.com/app/detail/3814");
- smc.game.GameModel.protocolType = 2;
- break;
- case "Privacy Policy":
- // 在游戏内打开隐私协议
- smc.game.GameModel.protocolType = 1;
- // sys.openURL("https://store.cocos.com/app/detail/3814");
- break;
- }
- LoginHandler.inst.openAgreement();
- }
- }
|