Selaa lähdekoodia

提交Assets文件

mojunshou 1 vuosi sitten
vanhempi
commit
283b9485df

+ 3 - 3
assets/bundle/common/prefab/setting.prefab

@@ -577,8 +577,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 328,
-      "height": 88
+      "width": 320,
+      "height": 80
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -614,7 +614,7 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "30aabf49-1a8a-4da8-963f-6e7678d0b5b5@f9941",
+      "__uuid__": "85316d7b-7c9b-498e-9dec-3b794aa94fba@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 0,

+ 393 - 18
assets/bundle/gui/loading/loading.prefab

@@ -26,25 +26,28 @@
       },
       {
         "__id__": 46
+      },
+      {
+        "__id__": 88
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 88
+        "__id__": 102
       },
       {
-        "__id__": 90
+        "__id__": 104
       },
       {
-        "__id__": 92
+        "__id__": 106
       },
       {
-        "__id__": 94
+        "__id__": 108
       }
     ],
     "_prefab": {
-      "__id__": 96
+      "__id__": 110
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -269,7 +272,7 @@
         "__id__": 27
       }
     ],
-    "_active": false,
+    "_active": true,
     "_components": [
       {
         "__id__": 35
@@ -293,7 +296,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -683.046,
+      "y": -527.1499999999999,
       "z": 0
     },
     "_lrot": {
@@ -442,7 +445,7 @@
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
-    "_enableOutline": false,
+    "_enableOutline": true,
     "_outlineColor": {
       "__type__": "cc.Color",
       "r": 0,
@@ -729,8 +732,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 120.078125,
-      "height": 50.4
+      "width": 96.0625,
+      "height": 40.32
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -768,7 +771,7 @@
     "_string": "{{0}}%",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 40,
+    "_actualFontSize": 32,
     "_fontSize": 32,
     "_fontFamily": "Arial",
     "_lineHeight": 32,
@@ -991,7 +994,7 @@
     "_left": 0,
     "_right": 0,
     "_top": 0,
-    "_bottom": 82.9539999999999,
+    "_bottom": 238.85000000000008,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
@@ -1039,7 +1042,7 @@
         "__id__": 55
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 83
@@ -1394,7 +1397,7 @@
   {
     "__type__": "cc.Node",
     "_name": "Checkmark",
-    "_objFlags": 0,
+    "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 56
@@ -1985,6 +1988,378 @@
     "nestedPrefabInstanceRoots": null
   },
   {
+    "__type__": "cc.Node",
+    "_name": "btn_showAd",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 89
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 95
+      },
+      {
+        "__id__": 97
+      },
+      {
+        "__id__": 99
+      }
+    ],
+    "_prefab": {
+      "__id__": 101
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 512,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 88
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 90
+      },
+      {
+        "__id__": 92
+      }
+    ],
+    "_prefab": {
+      "__id__": 94
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 89
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 91
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "beSFoWPQ5JXoEaqddQH2Jd"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 89
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 93
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_string": "button",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 20,
+    "_fontSize": 20,
+    "_fontFamily": "Arial",
+    "_lineHeight": 40,
+    "_overflow": 1,
+    "_enableWrapText": false,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": false,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_enableOutline": false,
+    "_outlineColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_outlineWidth": 2,
+    "_enableShadow": false,
+    "_shadowColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_shadowOffset": {
+      "__type__": "cc.Vec2",
+      "x": 2,
+      "y": 2
+    },
+    "_shadowBlur": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "8ac3Z5aYZCbqoWvyqG5e9Y"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "a5B0Uu4uNOn7W5xYXu/zEW",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 88
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 96
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "9dR1wotiZJ8LERufOre842"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 88
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 98
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "d3f3jWSZBAYas6CvOArGUQ"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 88
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 100
+    },
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 2,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
+    },
+    "_hoverColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_normalSprite": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_hoverSprite": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_pressedSprite": {
+      "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_disabledSprite": {
+      "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_duration": 0.1,
+    "_zoomScale": 1.2,
+    "_target": {
+      "__id__": 88
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "01LElVc8lM0ZW9RAgUhhLJ"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "58SEg+Z05KBqN7HxDcEZcN",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
     "__type__": "cc.UITransform",
     "_name": "loading<UITransform>",
     "_objFlags": 0,
@@ -1994,7 +2369,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 89
+      "__id__": 103
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2022,7 +2397,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 91
+      "__id__": 105
     },
     "_alignFlags": 45,
     "_target": null,
@@ -2058,7 +2433,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 93
+      "__id__": 107
     },
     "_id": ""
   },
@@ -2076,7 +2451,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 95
+      "__id__": 109
     },
     "_id": ""
   },

+ 45 - 1
assets/script/game/common/manager/CocosHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-31 10:45:44
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-07 10:16:02
+ * @LastEditTime: 2025-04-07 15:35:51
  * @Description: CocosHandler 处理类负责与安卓交互
  */
 import { native } from 'cc';
@@ -130,6 +130,50 @@ export class CocosHandler {
     }
 
 
+    //广告请求--插屏广告
+    async ad_interstitial() {
+        const param = {
+            "funcId": "103",
+            "callback":
+            {
+                "onLoaded": "",
+                "onLoadFailed": "CocosHandler.inst.ad_interstitial_load_failed",
+                "onShow": "",
+                "onShowFailed": "CocosHandler.inst.ad_interstitial_show_failed",
+                "onClose": "CocosHandler.inst.ad_interstitial_close"
+            }
+        }
+        const data: CocosHandlerType = {
+            method: "ad.interstitial",
+            param: JSON.stringify(param)
+        }
+        let result = await this.sendMessageToAndroid(data);
+        return result;
+    }
+
+
+    //广告关闭回调
+    ad_interstitial_close(type: boolean) {
+        console.log("广告关闭回调", type);
+    }
+
+    //广告加载成功回调
+    ad_interstitial_loaded() {
+        console.log("广告加载成功回调");
+    }
+
+    //广告加载失败回调
+    ad_interstitial_load_failed() {
+        console.log("广告加载失败回调");
+    }
+
+    //广告显示失败回调
+    ad_interstitial_show_failed() {
+        console.log("广告显示失败回调");
+    }
+
+
+
 
 
     //===================安卓回调Cocos======================

+ 33 - 1
assets/script/game/common/manager/MessgageEvent.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-07 10:17:16
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-07 10:35:53
+ * @LastEditTime: 2025-04-07 11:05:15
  * @Description: 消息定义
  */
 
@@ -22,6 +22,38 @@ export enum MessgageEvent {
     GetDailyTask = server_url + "/project/playlet/v1/daily/eliminationTsk/info",
     /**用户道具信息*/
     UserItemInfo = server_url + "/project/playlet/v1/props/all",
+    /**直接领取通关奖励*/
+    GetPassReward = server_url + "/project/playlet/v1/reward/littlePass",
+    /**少量领取翻倍奖励*/
+    GetLittlePassReward = server_url + "/project/playlet/v1/reward/double",
+    /**加速奖励*/
+    GetSpeedReward = server_url + "/project/playlet/v1/reward/speed",
+    /**10倍领取通关奖励*/
+    GetTenTimesPassReward = server_url + "/project/playlet/v1/reward/doublePass",
+    /**全部领取翻倍奖励*/
+    GetAllDoublePassReward = server_url + "/project/playlet/v1/reward/twoDouble",
+    /**消除奖励*/
+    GetEliminationReward = server_url + "/project/playlet/v1/reward/elimination",
+    /**红包币提现*/
+    GetRedPacketCash = server_url + "/project/playlet/v1/withdraw/convert",
+    /**提现记录*/
+    GetWithdrawRecord = server_url + "/project/playlet/v1/withdraw/log/page",
+    /**提现返利*/
+    GetWithdrawReward = server_url + "/project/playlet/v1/withdraw/rebate",
+    /**提现页信息*/
+    GetWithdrawInfo = server_url + "/project/playlet/v3/withdraw/view/detail",
+    /**福利点提现*/
+    GetWelfarePointCash = server_url + "/project/playlet/v1/reward/weal",
+    /**获取当前关卡配置信息*/
+    GetCurrentLevelConfig = server_url + "/project/playlet/v1/checkPoint/conf",
+    /**获取所有关卡配置信息*/
+    GetAllLevelConfig = server_url + "/project/playlet/v1/checkPoint/confAll",
+    /**获取当前关卡信息*/
+    GetCurrentLevelInfo = server_url + "/project/playlet/v1/checkPoint/current",
+    /**保存当前关卡信息*/
+    SaveCurrentLevelInfo = server_url + "/project/playlet/v1/checkPoint/saveLevelInfo",
+    /**下一关*/
+    NextLevel = server_url + "/project/playlet/v1/checkPoint/next",
 
 }
 

+ 3 - 3
assets/script/game/common/tips/ClickEventHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 17:46:09
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-03 16:39:39
+ * @LastEditTime: 2025-04-07 16:09:01
  * @Description: 用户协议和隐私协议点击事件
  */
 import { sys } from 'cc';
@@ -24,11 +24,11 @@ export class ClickEventHandler extends GameComponent {
             case "User Agreement":
                 // 在游戏内打开用户协议
                 // sys.openURL("https://store.cocos.com/app/detail/3814");
-                smc.account.AccountModel.ProtocolType = 1;
+                smc.account.AccountModel.ProtocolType = 2;
                 break;
             case "Privacy Policy":
                 // 在游戏内打开隐私协议
-                smc.account.AccountModel.ProtocolType = 2;
+                smc.account.AccountModel.ProtocolType = 1;
                 // sys.openURL("https://store.cocos.com/app/detail/3814");
                 break;
         }

+ 20 - 19
assets/script/game/initialize/view/LoadingViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 16:23:51
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-02 15:04:39
+ * @LastEditTime: 2025-04-07 16:05:58
  * @Description: loading界面
  */
 import { _decorator, sys } from "cc";
@@ -13,7 +13,6 @@ import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs
 import { CCVMParentComp } from "../../../../../extensions/oops-plugin-framework/assets/module/common/CCVMParentComp";
 import { AndroidEvent } from "../../common/config/AndroidEvent";
 import { UIID } from "../../common/config/GameUIConfig";
-import { AndroidMessageCenter } from '../../common/manager/AndroidMessageCenter';
 import { smc } from "../../common/SingletonModuleComp";
 import { EliminateViewComp } from "../../eliminate/view/EliminateViewComp";
 import { CocosHandler } from "../../common/manager/CocosHandler";
@@ -45,24 +44,21 @@ export class LoadingViewComp extends CCVMParentComp {
         this.setButton();
     }
 
-    enter() {
+    async enter() {
         this.addEvent();
-        //查看缓存有没有同意过,也要向服务器发送登录请求,如果有过登录就直接拿数据登录,没有就显示微信登录
-        // let data = oops.storage.get("agree");
-        // if (data == null || data == "") {
-        //     //打开温馨提示
-        //     oops.gui.open(UIID.KindTips);
-        //     return;
-        // } else {
-        //     //同意过
-        //     if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-
-        //     } else {
-        //         //非原生,网页的
-        //         this.loadRes();
-        //     }
-        // }
-        this.loadRes();
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+            const state = await CocosHandler.inst.getPrivacyStatus();
+            console.log("隐私状态>>>>>>>>>>>>>>>>", state);
+            if (state) {
+                //同意过,是否是登录状态,同意过就请求数据保存数,然后直接加载资源
+            } else {
+                //没有同意过
+                oops.gui.open(UIID.KindTips);
+            }
+        } else {
+            //非原生,网页的
+            this.loadRes();
+        }
     }
 
 
@@ -153,6 +149,11 @@ export class LoadingViewComp extends CCVMParentComp {
         }
     }
 
+
+    private btn_showAd() {
+        CocosHandler.inst.ad_interstitial();
+    }
+
     /**
      * @description: 显示微信登录
      * @return {*}