future 1 vuosi sitten
vanhempi
sitoutus
b56e7cd97c

+ 162 - 20
assets/resources/ui/bag.prefab

@@ -26,28 +26,31 @@
       },
       {
         "__id__": 30
+      },
+      {
+        "__id__": 74
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 74
+        "__id__": 80
       },
       {
-        "__id__": 76
+        "__id__": 82
       },
       {
-        "__id__": 78
+        "__id__": 84
       },
       {
-        "__id__": 80
+        "__id__": 86
       },
       {
-        "__id__": 82
+        "__id__": 88
       }
     ],
     "_prefab": {
-      "__id__": 84
+      "__id__": 90
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -109,7 +112,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 821.5,
+      "y": 821.5000000000001,
       "z": 0
     },
     "_lrot": {
@@ -521,7 +524,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 577.5,
+      "y": 577.5000000000001,
       "z": 0
     },
     "_lrot": {
@@ -914,7 +917,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 667.5,
+      "y": 667.5000000000001,
       "z": 0
     },
     "_lrot": {
@@ -955,7 +958,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 0,
-      "height": 1335
+      "height": 1335.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1070,7 +1073,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1040,
-      "height": 1335
+      "height": 1335.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1227,7 +1230,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -717.5,
+      "y": -717.5000000000001,
       "z": 0
     },
     "_lrot": {
@@ -1374,7 +1377,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1040,
-      "height": 1335
+      "height": 1335.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1537,7 +1540,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1377
+      "height": 1377.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1644,6 +1647,142 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "img_empty",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 75
+      },
+      {
+        "__id__": 77
+      }
+    ],
+    "_prefab": {
+      "__id__": 79
+    },
+    "_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__": 74
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 76
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 526,
+      "height": 536
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "0cyAlogFtKuLdAYS1mi7LR"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 74
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 78
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "e97daa1a-5f8e-457b-bf1e-fe5d0d7d9584@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": "74s+vN2E5PR5K/tlrug1JQ"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "9frE88rBpI/IjBZipSGDfk",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -1654,12 +1793,12 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 75
+      "__id__": 81
     },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1682,7 +1821,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 77
+      "__id__": 83
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1727,7 +1866,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 79
+      "__id__": 85
     },
     "_alignFlags": 45,
     "_target": null,
@@ -1763,7 +1902,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 81
+      "__id__": 87
     },
     "btn_back": {
       "__id__": 3
@@ -1782,6 +1921,9 @@
       "__uuid__": "f8eaf49a-71a1-41c5-a63a-463147999958",
       "__expectedType__": "cc.Prefab"
     },
+    "img_empty": {
+      "__id__": 74
+    },
     "_id": ""
   },
   {
@@ -1798,7 +1940,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 83
+      "__id__": 89
     },
     "_id": ""
   },

+ 10 - 10
assets/resources/ui/rank.prefab

@@ -115,7 +115,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 795,
+      "y": 795.0000000000001,
       "z": 0
     },
     "_lrot": {
@@ -537,7 +537,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0.7092285029295908,
-      "y": 569.5,
+      "y": 569.5000000000001,
       "z": 0
     },
     "_lrot": {
@@ -1959,7 +1959,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 70,
+      "y": 70.00000000000011,
       "z": 0
     },
     "_lrot": {
@@ -7680,7 +7680,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 92.5,
+      "y": 92.50000000000011,
       "z": 0
     },
     "_lrot": {
@@ -7721,7 +7721,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1000,
-      "height": 185
+      "height": 185.00000000000023
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -7994,7 +7994,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 185
+      "height": 185.00000000000023
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -8113,7 +8113,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1140
+      "height": 1140.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -8251,7 +8251,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -810.5,
+      "y": -810.5000000000001,
       "z": 0
     },
     "_lrot": {
@@ -11097,7 +11097,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 427.5,
-      "y": 432.5,
+      "y": 432.5000000000001,
       "z": 0
     },
     "_lrot": {
@@ -11518,7 +11518,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 13 - 7
assets/script/GameManager.ts

@@ -151,9 +151,11 @@ export class GameManager extends Component {
     }
 
     // 请求用户注册/设置地区 stype 1:注册 2:重新设置
-    public static requestUserSetRegion(region_id:number,stype:number,cb) {
+    public static requestUserSetRegion(region_id:number,stype:number,cb, show_loading:boolean=false) {
+        if(show_loading) {uiManager.Instance().showLoading()}
         let opt = {'region_id':region_id, 'stype':stype}
         http.post(config.API.user_set_region, opt, (err,d)=>{
+            if(show_loading) {uiManager.Instance().hideLoading()}
             let nd = JSON.parse(d)
             if(nd.code === config.status.SUCCESS){
                 if(cb!=null){
@@ -181,15 +183,15 @@ export class GameManager extends Component {
     }
 
     // 请求排行列表
-    public static requestRankList(region_id:number, cb) {
+    public static requestRankList(region_id:number, cb, show_loading:boolean=false) {
+        if(show_loading) {uiManager.Instance().showLoading()}
         http.post(config.API.rankings(region_id),null, (err,d)=>{
+            if(show_loading) {uiManager.Instance().hideLoading()}
             if(!err){
                 let data = JSON.parse(d)
                 if(data.code===config.status.SUCCESS){
                     // console.log('data=',data.content)
-                    if(cb!=null) {
-                        cb(data.content)
-                    }
+                    cb && cb(data.content)
                 }
             } else{
                 console.log("rankList err",err)
@@ -198,9 +200,11 @@ export class GameManager extends Component {
     }
 
     // 背包列表
-    public static requestBagList(stype_id:number, cb) {
+    public static requestBagList(stype_id:number, cb, show_loading:boolean=false) {
+        if(show_loading) {uiManager.Instance().showLoading()}
         let opt = {'stype_id':stype_id}
         http.post(config.API.bag_list, opt, (err,d)=>{
+            if(show_loading) {uiManager.Instance().hideLoading()}
             if(!err){
                 let nd = JSON.parse(d)
                 if(nd.code === config.status.SUCCESS){
@@ -212,9 +216,11 @@ export class GameManager extends Component {
     }
 
     // 兑换车辆  
-    public static requestExchangeCar(car_id:number, cb) {
+    public static requestExchangeCar(car_id:number, cb, show_loading:boolean=false) {
+        if(show_loading) {uiManager.Instance().showLoading()}
         let opt = {'car_id':car_id}
         http.post(config.API.exchange_car, opt, (err,d)=>{
+            if(show_loading) {uiManager.Instance().hideLoading()}
             if(!err){
                 let nd = JSON.parse(d)
                 if(nd.code === config.status.SUCCESS){

+ 3 - 0
assets/script/ui/announcement.ts

@@ -59,6 +59,9 @@ export class announcement extends base_ui {
     }
 
     private setRead() {
+        if(tools.user_red_dot_data.bulletin_red_dot==0) {
+            return
+        }
         GameManager.requestUserSetReadRedDot(config.RED_DOT_TYPE.announcement, ()=>{
             tools.user_red_dot_data.bulletin_red_dot = 0
             ClientEvent.dispatchEvent(config.UI_EVENT.UPDATE_ANNOUNCEMENT_RED_DOT_STATUS)

+ 8 - 1
assets/script/ui/bag/bag.ts

@@ -16,6 +16,8 @@ export class bag extends Component {
 
     @property(Node) list_pageView:Node = null
     @property(Prefab) list_page_prefab:Prefab = null
+
+    @property(Node) img_empty:Node = null
     
     private cur_type_item:bag_type_item = null
     private data_list:bag_list_item_data[] = []
@@ -77,7 +79,12 @@ export class bag extends Component {
         GameManager.requestBagList(id, (d_list)=>{
             this.data_list = d_list
             this.loadListView()
-        })
+            if(this.data_list.length>0) {
+                this.img_empty.active = false
+            } else {
+                this.img_empty.active = true
+            }
+        },true)
     }
 
     private loadListView() {

+ 1 - 3
assets/script/ui/car_lib/car_lib_top.ts

@@ -55,15 +55,13 @@ export class car_lib_top extends Component {
     }
 
     private onSelectArea(obj:select_area, data:area_item_data) {
-        uiManager.Instance().showLoading()
         GameManager.requestUserSetRegion(data.id, 2, (d)=>{
-            uiManager.Instance().hideLoading()
             uiManager.showToast('修改成功')
             //更改数据
             userDataManager.user_data.update_region_status = d.update_region_status
             //关闭
             obj.closeSelf()
-        })
+        },true)
     }
     
 }

+ 1 - 1
assets/script/ui/exchange_car_view/exchange_car_view.ts

@@ -64,7 +64,7 @@ export class exchange_car_view extends base_ui {
                 this.close()
                 this.m_cb && this.m_cb()
             })
-        })
+        },true)
     }
 }
 

+ 1 - 1
assets/script/ui/loading_view.ts

@@ -198,7 +198,7 @@ export class loading_view extends Component {
                     userDataManager.user_data.license_code = d_content.license_code
                     this.m_pause_status = false
                     obj.closeSelf()
-                })
+                },true)
             })
         })
     }

+ 1 - 3
assets/script/ui/rank/rank.ts

@@ -52,10 +52,8 @@ export class rank extends Component {
         } else if(type==3) {
             id = userDataManager.user_data.region_id
         }
-        uiManager.Instance().showLoading()
         GameManager.requestRankList(id,(d_content)=>{
             // console.log('排行列表 id=',id, '数据=',d_content)
-            uiManager.Instance().hideLoading()
             if(id==0) {
                 if(this.m_onReloadCountryDataCallback!=null) {
                     this.m_onReloadCountryDataCallback(d_content)
@@ -64,7 +62,7 @@ export class rank extends Component {
             this.reloadListTop(d_content, type)
             this.reloadListContent(d_content, type)
             this.reloadMyInfo(type)
-        })
+        }, true)
     }
 
     reloadListTop(data_list, type:number) {

BIN
assets/texture/ui/bag/bag_empty.png


+ 134 - 0
assets/texture/ui/bag/bag_empty.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "e97daa1a-5f8e-457b-bf1e-fe5d0d7d9584",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "e97daa1a-5f8e-457b-bf1e-fe5d0d7d9584@6c48a",
+      "displayName": "bag_empty",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "e97daa1a-5f8e-457b-bf1e-fe5d0d7d9584",
+        "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": "e97daa1a-5f8e-457b-bf1e-fe5d0d7d9584@f9941",
+      "displayName": "bag_empty",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 526,
+        "height": 536,
+        "rawWidth": 526,
+        "rawHeight": 536,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -263,
+            -268,
+            0,
+            263,
+            -268,
+            0,
+            -263,
+            268,
+            0,
+            263,
+            268,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            536,
+            526,
+            536,
+            0,
+            0,
+            526,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -263,
+            -268,
+            0
+          ],
+          "maxPos": [
+            263,
+            268,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "e97daa1a-5f8e-457b-bf1e-fe5d0d7d9584@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": false,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "e97daa1a-5f8e-457b-bf1e-fe5d0d7d9584@f9941"
+  }
+}

BIN
assets/texture/ui/mailbox/mailbox_empty.png


+ 1 - 1
assets/texture/ui/mailbox/mailbox_empty.png.meta

@@ -127,7 +127,7 @@
   },
   "userData": {
     "type": "sprite-frame",
-    "hasAlpha": true,
+    "hasAlpha": false,
     "fixAlphaTransparencyArtifacts": false,
     "redirect": "bad06390-97ff-4656-ba8f-e53d9eeb02b5@f9941"
   }