| 1234567891011121314151617181920212223242526272829303132333435363738 |
- /*
- * @Author: mojunshou 1637302775@qq.com
- * @Date: 2025-03-19 17:46:09
- * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-03 16:39:39
- * @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';
- 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.account.AccountModel.ProtocolType = 1;
- break;
- case "Privacy Policy":
- // 在游戏内打开隐私协议
- smc.account.AccountModel.ProtocolType = 2;
- // sys.openURL("https://store.cocos.com/app/detail/3814");
- break;
- }
- CocosHandler.inst.openAgreement();
- }
- }
|