future 1 рік тому
батько
коміт
6e46910eff

+ 179 - 34
assets/resources/ui/car_lib_list_item.prefab

@@ -31,23 +31,23 @@
         "__id__": 20
       },
       {
-        "__id__": 34
+        "__id__": 40
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 46
+        "__id__": 52
       },
       {
-        "__id__": 48
+        "__id__": 54
       },
       {
-        "__id__": 50
+        "__id__": 56
       }
     ],
     "_prefab": {
-      "__id__": 52
+      "__id__": 58
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -540,22 +540,25 @@
     "_children": [
       {
         "__id__": 21
+      },
+      {
+        "__id__": 27
       }
     ],
     "_active": false,
     "_components": [
       {
-        "__id__": 27
+        "__id__": 33
       },
       {
-        "__id__": 29
+        "__id__": 35
       },
       {
-        "__id__": 31
+        "__id__": 37
       }
     ],
     "_prefab": {
-      "__id__": 33
+      "__id__": 39
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -722,6 +725,142 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "img_keduihuan",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 20
+    },
+    "_children": [],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 28
+      },
+      {
+        "__id__": 30
+      }
+    ],
+    "_prefab": {
+      "__id__": 32
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -3,
+      "y": -14,
+      "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__": 27
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 29
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 183,
+      "height": 101
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "8dEwVpKRZEqIBgFqRzA071"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 27
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 31
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "93c35630-ce44-43bb-88ac-3b22fd18c525@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "4cD6h3vqpFmoA3e6gtdGqh"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "422x4zDtBB/4Y8IynyW0hW",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -732,7 +871,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 28
+      "__id__": 34
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -760,7 +899,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 30
+      "__id__": 36
     },
     "_alignFlags": 45,
     "_target": null,
@@ -796,7 +935,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 32
+      "__id__": 38
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -854,25 +993,25 @@
     },
     "_children": [
       {
-        "__id__": 35
+        "__id__": 41
       }
     ],
     "_active": false,
     "_components": [
       {
-        "__id__": 41
+        "__id__": 47
       },
       {
-        "__id__": 43
+        "__id__": 49
       }
     ],
     "_prefab": {
-      "__id__": 45
+      "__id__": 51
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 143.837,
-      "y": 115.765,
+      "x": 140.837,
+      "y": 101.7650000000001,
       "z": 0
     },
     "_lrot": {
@@ -904,20 +1043,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 34
+      "__id__": 40
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 36
+        "__id__": 42
       },
       {
-        "__id__": 38
+        "__id__": 44
       }
     ],
     "_prefab": {
-      "__id__": 40
+      "__id__": 46
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -954,11 +1093,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 35
+      "__id__": 41
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 37
+      "__id__": 43
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -982,11 +1121,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 35
+      "__id__": 41
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 39
+      "__id__": 45
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1063,11 +1202,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 34
+      "__id__": 40
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 42
+      "__id__": 48
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1091,11 +1230,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 34
+      "__id__": 40
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 44
+      "__id__": 50
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1153,7 +1292,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 47
+      "__id__": 53
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1181,7 +1320,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 49
+      "__id__": 55
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1226,7 +1365,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 51
+      "__id__": 57
     },
     "sf_bg_select": {
       "__uuid__": "3a64131b-63dc-4fd3-88ec-2bd86ca51cf8@f9941",
@@ -1248,8 +1387,14 @@
     "suo_node": {
       "__id__": 20
     },
+    "img_suo": {
+      "__id__": 21
+    },
+    "img_keduihuan": {
+      "__id__": 27
+    },
     "img_kuang": {
-      "__id__": 34
+      "__id__": 40
     },
     "_id": ""
   },

+ 5 - 5
assets/resources/ui/home.prefab

@@ -149,7 +149,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1919.9999999999998
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -296,7 +296,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 284.9999999999999,
+      "y": 285,
       "z": 0
     },
     "_lrot": {
@@ -4038,7 +4038,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -959.9999999999999,
+      "y": -960,
       "z": 0
     },
     "_lrot": {
@@ -12577,7 +12577,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 144.9999999999999,
+      "y": 145,
       "z": 0
     },
     "_lrot": {
@@ -15439,7 +15439,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1919.9999999999998
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 1 - 0
assets/script/GameManager.ts

@@ -34,6 +34,7 @@ export class GameManager extends Component {
             play_cb && play_cb()
         })
         if(userDataManager.getUserIsFreeAds()) {
+            ClientEvent.dispatchEvent(config.UI_EVENT.UPDATE_GAME_FREE_COUNT)
             call_back()
             return
         }

+ 1 - 1
assets/script/config.ts

@@ -3,7 +3,7 @@ const { ccclass, property } = _decorator;
 
 @ccclass('config')
 export class config  {
-    static debug = true
+    static debug = false
     static gameName = "开局自行车";
     static websocket_domain = config.debug?'wss://snakews.xwrun.com':"wss://snakews.hainanmlwl.com" 
     public static Platform_id = {

+ 8 - 3
assets/script/game/results.ts

@@ -10,6 +10,7 @@ import { GameManager } from '../GameManager';
 import { dataManager } from '../manager/dataManager';
 import { results_new_car } from './results_new_car';
 import { btn_relife } from './btn_relife';
+import { userDataManager } from '../manager/userDataManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('results')
@@ -85,9 +86,13 @@ export class results extends base_ui {
         }else{
             this.btn_video_reLife.getComponent(btn_relife).showStatus(false)
         }
-        let show_count = dataManager.getTodayGameFreeTotalCount() - free_num
-        if(show_count<0) { show_count = 0 }
-        this.lab_free_num.getComponent(Label).string = `今日免费 ${show_count} 次`
+        if(userDataManager.getUserIsFreeAds()) {
+            this.lab_free_num.getComponent(Label).string = ''
+        } else {
+            let show_count = dataManager.getTodayGameFreeTotalCount() - free_num
+            if(show_count<0) { show_count = 0 }
+            this.lab_free_num.getComponent(Label).string = `今日免费 ${show_count} 次`
+        }
         http.post(config.API.sync_integral,{"integral":scores},(err,data)=>{
             if(!err){
                 let d = JSON.parse(data)

+ 13 - 0
assets/script/ui/car_lib/car_lib_list_item.ts

@@ -12,6 +12,8 @@ export class car_lib_list_item extends Component {
     @property(Node) lab_car_name:Node = null
     @property(Node) lab_car_score:Node = null
     @property(Node) suo_node:Node = null
+    @property(Node) img_suo:Node = null
+    @property(Node) img_keduihuan:Node = null
     @property(Node) img_kuang:Node = null
     private m_data:car_item_data = null
     private m_index:number = 0
@@ -39,6 +41,7 @@ export class car_lib_list_item extends Component {
             this.lab_car_score.getComponent(Label).string = string
             this.img_kuang.active = true
         }
+        this.img_keduihuan.active = false
     }
 
     public getData():car_item_data{
@@ -72,5 +75,15 @@ export class car_lib_list_item extends Component {
     public setUnselectedStatus() {
         this.node.getComponent(Sprite).spriteFrame = this.sf_bg_unselect
     }
+
+    public setSuipianOperation() {
+        if(this.m_data.temp_bag_list_item_data.quantity>=this.m_data.unlock_points) {
+            this.img_suo.active = false
+            this.img_keduihuan.active = true
+        } else {
+            this.img_suo.active = true
+            this.img_keduihuan.active = false
+        }       
+    }
 }
 

+ 5 - 1
assets/script/ui/car_lib/car_lib_page_item.ts

@@ -87,7 +87,7 @@ export class car_lib_page_item extends Component {
             const element = data_list[index];
             // 是否解锁
             var is_jiesuo = false
-
+            
             // 汽车碎片逻辑
             if(element.stype==car_type.suipian) {
                 if(dataManager.userCarListHavCar(element.id)) {
@@ -123,6 +123,10 @@ export class car_lib_page_item extends Component {
             } else {
                 item_component.setJiesuoUnselectedStatus()
             }
+
+            // if(element.stype==car_type.suipian) {
+            //     item_component.setSuipianOperation()
+            // }
             
             if(userDataManager.user_car_list.default_car_id == element.id) {
                 item_component.setSelectedStatus()

+ 9 - 1
assets/script/ui/home/home_bottom.ts

@@ -104,13 +104,21 @@ export class home_bottom extends Component {
             } else {
                 this.img_loudou.getComponent(Animation).stop()
             }
+            this.reloadGameFreeCount()
         })
     }
 
     public reloadGameFreeCount() {
+        let lab_com = this.lab_game_free_count.getComponent(Label)
+        if(userDataManager.getUserIsFreeAds()) {
+            lab_com.fontSize = 66
+            lab_com.string = `∞`
+            return
+        }
         let count = dataManager.getTodayGameFreeTotalCount()-dataManager.getTodayUserGameFreeCount()
         if(count<0) { count = 0 }
-        this.lab_game_free_count.getComponent(Label).string = `${count}`
+        lab_com.fontSize = 33
+        lab_com.string = `${count}`
     }
     
     public requestCountryRankData(){

BIN
assets/texture/ui/car_lib/car_lib_keduihuan.png


+ 134 - 0
assets/texture/ui/car_lib/car_lib_keduihuan.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "93c35630-ce44-43bb-88ac-3b22fd18c525",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "93c35630-ce44-43bb-88ac-3b22fd18c525@6c48a",
+      "displayName": "car_lib_keduihuan",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "93c35630-ce44-43bb-88ac-3b22fd18c525",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "93c35630-ce44-43bb-88ac-3b22fd18c525@f9941",
+      "displayName": "car_lib_keduihuan",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 3,
+        "trimX": 1,
+        "trimY": 1,
+        "width": 183,
+        "height": 101,
+        "rawWidth": 185,
+        "rawHeight": 109,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -91.5,
+            -50.5,
+            0,
+            91.5,
+            -50.5,
+            0,
+            -91.5,
+            50.5,
+            0,
+            91.5,
+            50.5,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            1,
+            108,
+            184,
+            108,
+            1,
+            7,
+            184,
+            7
+          ],
+          "nuv": [
+            0.005405405405405406,
+            0.06422018348623854,
+            0.9945945945945946,
+            0.06422018348623854,
+            0.005405405405405406,
+            0.9908256880733946,
+            0.9945945945945946,
+            0.9908256880733946
+          ],
+          "minPos": [
+            -91.5,
+            -50.5,
+            0
+          ],
+          "maxPos": [
+            91.5,
+            50.5,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "93c35630-ce44-43bb-88ac-3b22fd18c525@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "93c35630-ce44-43bb-88ac-3b22fd18c525@f9941"
+  }
+}