| 1234567891011121314151617181920212223242526272829303132 |
- /*
- * @Author: mojunshou 1637302775@qq.com
- * @Date: 2025-03-19 17:46:09
- * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-03-20 10:31:42
- * @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";
- 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");
- break;
- case "Privacy Policy":
- // 在游戏内打开隐私协议
- sys.openURL("https://store.cocos.com/app/detail/3814");
- break;
- }
- }
- }
|