future 1 jaar geleden
bovenliggende
commit
b8b964dd6a

+ 4 - 4
assets/resources/ui/restart_view.prefab

@@ -788,8 +788,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 712,
-      "height": 101
+      "width": 710,
+      "height": 100
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1181,8 +1181,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 334,
-      "height": 136
+      "width": 333,
+      "height": 135
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 392 - 14
assets/resources/ui/setting.prefab

@@ -29,22 +29,25 @@
       },
       {
         "__id__": 102
+      },
+      {
+        "__id__": 116
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 116
+        "__id__": 130
       },
       {
-        "__id__": 118
+        "__id__": 132
       },
       {
-        "__id__": 120
+        "__id__": 134
       }
     ],
     "_prefab": {
-      "__id__": 122
+      "__id__": 136
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2505,8 +2508,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 352.978,
-      "y": 562.575,
+      "x": 335.907,
+      "y": 558.814,
       "z": 0
     },
     "_lrot": {
@@ -2555,8 +2558,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
+      "x": -3.907,
+      "y": -6.814,
       "z": 0
     },
     "_lrot": {
@@ -2627,9 +2630,9 @@
     "_dstBlendFactor": 4,
     "_color": {
       "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
+      "r": 255,
+      "g": 255,
+      "b": 255,
       "a": 255
     },
     "_string": "id:",
@@ -2832,18 +2835,390 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "btn_clear_local_data",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 117
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 123
+      },
+      {
+        "__id__": 125
+      },
+      {
+        "__id__": 127
+      }
+    ],
+    "_prefab": {
+      "__id__": 129
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -378.592,
+      "y": 870.276,
+      "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__": 116
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 118
+      },
+      {
+        "__id__": 120
+      }
+    ],
+    "_prefab": {
+      "__id__": 122
+    },
+    "_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__": 1
+      "__id__": 117
     },
     "_enabled": true,
     "__prefab": {
+      "__id__": 119
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 200,
+      "height": 80
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "ddkrRsQA1A8JaOacHGbqlt"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
       "__id__": 117
     },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 121
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_string": "清空本地缓存\n(倒计时)",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 30,
+    "_fontSize": 30,
+    "_fontFamily": "Arial",
+    "_lineHeight": 40,
+    "_overflow": 2,
+    "_enableWrapText": true,
+    "_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": "d5Lu9AdONNYLpHVpO0n8cX"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "b8QEuatCFDx7PSAU78KKDS",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 116
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 124
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 200,
+      "height": 80
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "84LDBBroxBVrd9nBvU58mS"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 116
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 126
+    },
+    "_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": "f6LscLbKJA3722FavsQEIw"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 116
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 128
+    },
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 3,
+    "_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": 0.9,
+    "_target": {
+      "__id__": 116
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "58Ugt7sR9DSpHlDmuuAD3j"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "afY9t23+5MLojVQSDSBCmm",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 131
+    },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
@@ -2870,7 +3245,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 119
+      "__id__": 133
     },
     "_alignFlags": 45,
     "_target": null,
@@ -2906,7 +3281,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 121
+      "__id__": 135
     },
     "btn_close": {
       "__id__": 94
@@ -2935,6 +3310,9 @@
     "lab_user": {
       "__id__": 103
     },
+    "btn_clear_local_data": {
+      "__id__": 116
+    },
     "_id": ""
   },
   {

+ 10 - 0
assets/script/ui/setting.ts

@@ -3,6 +3,7 @@ import { base_ui } from '../fw/base_ui';
 import { audioManager } from '../manager/audioManager';
 import { GameManager } from '../GameManager';
 import { userDataManager } from '../manager/userDataManager';
+import { config } from '../config';
 const { ccclass, property } = _decorator;
 
 @ccclass('setting')
@@ -16,6 +17,7 @@ export class setting extends base_ui {
     @property(Node) zhendong_btn_off:Node = null;
     @property(Node) btn_user:Node = null;
     @property(Node) lab_user:Node = null;
+    @property(Node) btn_clear_local_data:Node = null;
 
     protected start(): void {
         this.onButtonListen(this.btn_close, ()=>{
@@ -41,10 +43,18 @@ export class setting extends base_ui {
         this.onButtonListen(this.zhendong_btn_off, ()=>{
             this.updateZhendongStatus(true)
         })
+
+        // 彩蛋
+        if(config.debug) {
+            this.btn_clear_local_data.active = true
+        }
         this.onButtonListen(this.btn_user, ()=>{
             this.lab_user.active = true
             this.lab_user.getComponent(Label).string = 'id:' + userDataManager.user_data.id
         })
+        this.onButtonListen(this.btn_clear_local_data, ()=>{
+            userDataManager.clearUserFreeAdsData()
+        })
 
         this.initData()
     }

BIN
assets/texture/ui/restart_view/restart_des.png


+ 24 - 24
assets/texture/ui/restart_view/restart_des.png.meta

@@ -42,12 +42,12 @@
         "trimType": "auto",
         "trimThreshold": 1,
         "rotated": false,
-        "offsetX": 0,
-        "offsetY": 0,
+        "offsetX": -1,
+        "offsetY": 0.5,
         "trimX": 0,
         "trimY": 0,
-        "width": 712,
-        "height": 101,
+        "width": 710,
+        "height": 100,
         "rawWidth": 712,
         "rawHeight": 101,
         "borderTop": 0,
@@ -61,17 +61,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -356,
-            -50.5,
+            -355,
+            -50,
             0,
-            356,
-            -50.5,
+            355,
+            -50,
             0,
-            -356,
-            50.5,
+            -355,
+            50,
             0,
-            356,
-            50.5,
+            355,
+            50,
             0
           ],
           "indexes": [
@@ -85,31 +85,31 @@
           "uv": [
             0,
             101,
-            712,
+            710,
             101,
             0,
-            0,
-            712,
-            0
+            1,
+            710,
+            1
           ],
           "nuv": [
             0,
+            0.009900990099009901,
+            0.9971910112359551,
+            0.009900990099009901,
             0,
             1,
-            0,
-            0,
-            1,
-            1,
+            0.9971910112359551,
             1
           ],
           "minPos": [
-            -356,
-            -50.5,
+            -355,
+            -50,
             0
           ],
           "maxPos": [
-            356,
-            50.5,
+            355,
+            50,
             0
           ]
         },

BIN
assets/texture/ui/restart_view/restart_look_video.png


+ 10 - 10
assets/texture/ui/restart_view/restart_look_video.png.meta

@@ -42,9 +42,9 @@
         "trimType": "auto",
         "trimThreshold": 1,
         "rotated": false,
-        "offsetX": -0.5,
+        "offsetX": 0.5,
         "offsetY": 0.5,
-        "trimX": 1,
+        "trimX": 2,
         "trimY": 0,
         "width": 333,
         "height": 136,
@@ -83,23 +83,23 @@
             3
           ],
           "uv": [
-            1,
+            2,
             137,
-            334,
+            335,
             137,
+            2,
             1,
-            1,
-            334,
+            335,
             1
           ],
           "nuv": [
-            0.002976190476190476,
+            0.005952380952380952,
             0.0072992700729927005,
-            0.9940476190476191,
+            0.9970238095238095,
             0.0072992700729927005,
-            0.002976190476190476,
+            0.005952380952380952,
             1,
-            0.9940476190476191,
+            0.9970238095238095,
             1
           ],
           "minPos": [

BIN
assets/texture/ui/restart_view/restart_share.png


+ 29 - 29
assets/texture/ui/restart_view/restart_share.png.meta

@@ -42,12 +42,12 @@
         "trimType": "auto",
         "trimThreshold": 1,
         "rotated": false,
-        "offsetX": -1,
-        "offsetY": 0.5,
-        "trimX": 0,
+        "offsetX": 0.5,
+        "offsetY": 1,
+        "trimX": 2,
         "trimY": 0,
-        "width": 334,
-        "height": 136,
+        "width": 333,
+        "height": 135,
         "rawWidth": 336,
         "rawHeight": 137,
         "borderTop": 0,
@@ -61,17 +61,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -167,
-            -68,
+            -166.5,
+            -67.5,
             0,
-            167,
-            -68,
+            166.5,
+            -67.5,
             0,
-            -167,
-            68,
+            -166.5,
+            67.5,
             0,
-            167,
-            68,
+            166.5,
+            67.5,
             0
           ],
           "indexes": [
@@ -83,33 +83,33 @@
             3
           ],
           "uv": [
-            0,
+            2,
             137,
-            334,
+            335,
             137,
-            0,
-            1,
-            334,
-            1
+            2,
+            2,
+            335,
+            2
           ],
           "nuv": [
-            0,
-            0.0072992700729927005,
-            0.9940476190476191,
-            0.0072992700729927005,
-            0,
+            0.005952380952380952,
+            0.014598540145985401,
+            0.9970238095238095,
+            0.014598540145985401,
+            0.005952380952380952,
             1,
-            0.9940476190476191,
+            0.9970238095238095,
             1
           ],
           "minPos": [
-            -167,
-            -68,
+            -166.5,
+            -67.5,
             0
           ],
           "maxPos": [
-            167,
-            68,
+            166.5,
+            67.5,
             0
           ]
         },