future 1 سال پیش
والد
کامیت
123da15f40

+ 174 - 107
assets/resources/ui/car_lib.prefab

@@ -30,9 +30,6 @@
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 174
-      },
       {
         "__id__": 176
       },
@@ -41,10 +38,13 @@
       },
       {
         "__id__": 180
+      },
+      {
+        "__id__": 182
       }
     ],
     "_prefab": {
-      "__id__": 182
+      "__id__": 184
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -106,7 +106,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 864.9999999999999,
+      "y": 873.4999999999999,
       "z": 0
     },
     "_lrot": {
@@ -322,7 +322,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 190
+      "height": 173
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -358,7 +358,7 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "462d4e98-b3c5-460e-b5bc-f305b78262ff@f9941",
+      "__uuid__": "f90e8ccf-60e8-4b79-a81a-8226e223ab88@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 0,
@@ -1790,14 +1790,11 @@
         "__id__": 77
       },
       {
-        "__id__": 121
+        "__id__": 123
       }
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 165
-      },
       {
         "__id__": 167
       },
@@ -1806,10 +1803,13 @@
       },
       {
         "__id__": 171
+      },
+      {
+        "__id__": 173
       }
     ],
     "_prefab": {
-      "__id__": 173
+      "__id__": 175
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1862,14 +1862,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 116
+        "__id__": 118
       },
       {
-        "__id__": 118
+        "__id__": 120
       }
     ],
     "_prefab": {
-      "__id__": 120
+      "__id__": 122
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2297,7 +2297,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 300,
-      "height": 50.4
+      "height": 60
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2332,13 +2332,13 @@
       "b": 237,
       "a": 255
     },
-    "_string": "1/15",
+    "_string": "1/1",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 41,
-    "_fontSize": 40,
+    "_actualFontSize": 51,
+    "_fontSize": 50,
     "_fontFamily": "Arial",
-    "_lineHeight": 40,
+    "_lineHeight": 50,
     "_overflow": 2,
     "_enableWrapText": true,
     "_font": null,
@@ -2544,8 +2544,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 258,
-      "height": 72
+      "width": 283,
+      "height": 84
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2581,7 +2581,7 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "53f2352a-1d68-42fb-8783-5a7f33f07c0c@f9941",
+      "__uuid__": "e7c25ef4-3e5b-4e8a-8144-99004196a359@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 0,
@@ -2688,10 +2688,13 @@
       },
       {
         "__id__": 113
+      },
+      {
+        "__id__": 115
       }
     ],
     "_prefab": {
-      "__id__": 115
+      "__id__": 117
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2773,7 +2776,7 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "a16b13f2-f4e2-4e40-90dc-13b7f4e4fcc6@f9941",
+      "__uuid__": "b1bd300f-37ee-4bfe-9648-2cbd012a8397@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 0,
@@ -2795,6 +2798,62 @@
     "__type__": "cc.CompPrefabInfo",
     "fileId": "ddmiZTHo1PLp3p2O/AdWmP"
   },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 110
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 116
+    },
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 3,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "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": null,
+    "_hoverSprite": null,
+    "_pressedSprite": null,
+    "_disabledSprite": null,
+    "_duration": 0.1,
+    "_zoomScale": 0.9,
+    "_target": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "89fSYahv5CMYYmUYRwm74a"
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -2818,7 +2877,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 117
+      "__id__": 119
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2846,7 +2905,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 119
+      "__id__": 121
     },
     "_alignFlags": 41,
     "_target": null,
@@ -2895,29 +2954,29 @@
     },
     "_children": [
       {
-        "__id__": 122
+        "__id__": 124
       },
       {
-        "__id__": 140
+        "__id__": 142
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 158
+        "__id__": 160
       },
       {
-        "__id__": 160
+        "__id__": 162
       },
       {
-        "__id__": 137
+        "__id__": 139
       },
       {
-        "__id__": 162
+        "__id__": 164
       }
     ],
     "_prefab": {
-      "__id__": 164
+      "__id__": 166
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2954,18 +3013,15 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 121
+      "__id__": 123
     },
     "_children": [
       {
-        "__id__": 123
+        "__id__": 125
       }
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 129
-      },
       {
         "__id__": 131
       },
@@ -2974,10 +3030,13 @@
       },
       {
         "__id__": 135
+      },
+      {
+        "__id__": 137
       }
     ],
     "_prefab": {
-      "__id__": 157
+      "__id__": 159
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3014,20 +3073,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 122
+      "__id__": 124
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 124
+        "__id__": 126
       },
       {
-        "__id__": 126
+        "__id__": 128
       }
     ],
     "_prefab": {
-      "__id__": 128
+      "__id__": 130
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3064,11 +3123,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 123
+      "__id__": 125
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 125
+      "__id__": 127
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3092,11 +3151,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 123
+      "__id__": 125
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 127
+      "__id__": 129
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3150,11 +3209,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 122
+      "__id__": 124
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 130
+      "__id__": 132
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3178,11 +3237,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 122
+      "__id__": 124
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 132
+      "__id__": 134
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3223,11 +3282,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 122
+      "__id__": 124
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 134
+      "__id__": 136
     },
     "_alignFlags": 37,
     "_target": null,
@@ -3259,17 +3318,17 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 122
+      "__id__": 124
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 136
+      "__id__": 138
     },
     "_scrollView": {
-      "__id__": 137
+      "__id__": 139
     },
     "_handle": {
-      "__id__": 126
+      "__id__": 128
     },
     "_direction": 1,
     "_enableAutoHide": false,
@@ -3286,11 +3345,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 121
+      "__id__": 123
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 138
+      "__id__": 140
     },
     "bounceDuration": 0.23,
     "brake": 0.75,
@@ -3301,11 +3360,11 @@
     "cancelInnerEvents": true,
     "scrollEvents": [],
     "_content": {
-      "__id__": 139
+      "__id__": 141
     },
     "_horizontalScrollBar": null,
     "_verticalScrollBar": {
-      "__id__": 135
+      "__id__": 137
     },
     "_id": ""
   },
@@ -3319,23 +3378,23 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 140
+      "__id__": 142
     },
     "_children": [],
     "_active": true,
     "_components": [
-      {
-        "__id__": 150
-      },
       {
         "__id__": 152
       },
       {
         "__id__": 154
+      },
+      {
+        "__id__": 156
       }
     ],
     "_prefab": {
-      "__id__": 156
+      "__id__": 158
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3372,18 +3431,15 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 121
+      "__id__": 123
     },
     "_children": [
       {
-        "__id__": 139
+        "__id__": 141
       }
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 141
-      },
       {
         "__id__": 143
       },
@@ -3392,10 +3448,13 @@
       },
       {
         "__id__": 147
+      },
+      {
+        "__id__": 149
       }
     ],
     "_prefab": {
-      "__id__": 149
+      "__id__": 151
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3432,11 +3491,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 140
+      "__id__": 142
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 142
+      "__id__": 144
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3460,11 +3519,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 140
+      "__id__": 142
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 144
+      "__id__": 146
     },
     "_type": 0,
     "_inverted": false,
@@ -3482,11 +3541,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 140
+      "__id__": 142
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 146
+      "__id__": 148
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3528,11 +3587,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 140
+      "__id__": 142
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 148
+      "__id__": 150
     },
     "_alignFlags": 45,
     "_target": null,
@@ -3577,11 +3636,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 139
+      "__id__": 141
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 151
+      "__id__": 153
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3605,11 +3664,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 139
+      "__id__": 141
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 153
+      "__id__": 155
     },
     "_alignFlags": 40,
     "_target": null,
@@ -3641,11 +3700,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 139
+      "__id__": 141
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 155
+      "__id__": 157
     },
     "_resizeMode": 1,
     "_layoutType": 3,
@@ -3705,11 +3764,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 121
+      "__id__": 123
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 159
+      "__id__": 161
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3733,11 +3792,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 121
+      "__id__": 123
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 161
+      "__id__": 163
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3775,11 +3834,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 121
+      "__id__": 123
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 163
+      "__id__": 165
     },
     "_alignFlags": 45,
     "_target": null,
@@ -3828,7 +3887,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 166
+      "__id__": 168
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3856,7 +3915,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 168
+      "__id__": 170
     },
     "_alignFlags": 45,
     "_target": null,
@@ -3892,7 +3951,7 @@
     },
     "_enabled": false,
     "__prefab": {
-      "__id__": 170
+      "__id__": 172
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3937,7 +3996,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 172
+      "__id__": 174
     },
     "btn_num_left": {
       "__id__": 79
@@ -3951,22 +4010,30 @@
     "btn_score_sort": {
       "__id__": 102
     },
+    "sf_score_up": {
+      "__uuid__": "e7c25ef4-3e5b-4e8a-8144-99004196a359@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "sf_score_down": {
+      "__uuid__": "e36e189a-fbf8-48d9-9120-fda4f108d34e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
     "btn_jiesuo": {
       "__id__": 110
     },
-    "sf_yijiesuo": {
-      "__uuid__": "07d957d3-e7bc-4d5f-aab7-961fa89cbc33@f9941",
+    "sf_jiesuo_select": {
+      "__uuid__": "fd60d1c7-8a62-41d2-b3fa-3dea49199761@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
-    "sf_weijiesuo": {
-      "__uuid__": "a16b13f2-f4e2-4e40-90dc-13b7f4e4fcc6@f9941",
+    "sf_jiesuo_unselect": {
+      "__uuid__": "b1bd300f-37ee-4bfe-9648-2cbd012a8397@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "list": {
-      "__id__": 121
+      "__id__": 123
     },
     "list_content": {
-      "__id__": 139
+      "__id__": 141
     },
     "list_item": {
       "__uuid__": "b85c48d6-b97b-4356-a409-607c29ea4b52",
@@ -4001,7 +4068,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 175
+      "__id__": 177
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -4029,7 +4096,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 177
+      "__id__": 179
     },
     "_alignFlags": 45,
     "_target": null,
@@ -4065,7 +4132,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 179
+      "__id__": 181
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -4110,7 +4177,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 181
+      "__id__": 183
     },
     "btn_back": {
       "__id__": 3

+ 2 - 2
assets/resources/ui/loading_view.prefab

@@ -140,7 +140,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -725,7 +725,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 64 - 20
assets/script/ui/car_lib/car_lib_bottom.ts

@@ -3,6 +3,7 @@ import { base_ui } from '../../fw/base_ui';
 import { tools } from '../../tools';
 import { car_lib_list_item } from './car_lib_list_item';
 import { userDataManager } from '../../manager/userDataManager';
+import { car_item_data } from '../../data';
 const { ccclass, property } = _decorator;
 
 @ccclass('car_lib_bottom')
@@ -11,14 +12,18 @@ export class car_lib_bottom extends base_ui {
     @property(Node) btn_num_right:Node = null
     @property(Node) lab_num:Node = null
     @property(Node) btn_score_sort:Node = null
+    @property(SpriteFrame) sf_score_up:SpriteFrame = null
+    @property(SpriteFrame) sf_score_down:SpriteFrame = null
     @property(Node) btn_jiesuo:Node = null
-    @property(SpriteFrame) sf_yijiesuo:SpriteFrame = null
-    @property(SpriteFrame) sf_weijiesuo:SpriteFrame = null
+    @property(SpriteFrame) sf_jiesuo_select:SpriteFrame = null
+    @property(SpriteFrame) sf_jiesuo_unselect:SpriteFrame = null
     @property(Node) list:Node = null
     @property(Node) list_content:Node = null
     @property(Prefab) list_item:Prefab = null
 
-    private is_jiesuo:boolean = false
+    private data_list:car_item_data[] = []
+    private is_sort_up_status:boolean = true
+    private is_jiesuo_status:boolean = false
     private num_current_count:number = 1
     private num_total_count:number = 1
     private current_select_list_item:car_lib_list_item = null
@@ -41,11 +46,12 @@ export class car_lib_bottom extends base_ui {
             this.updateNumStatus()
         })
         this.onButtonListen(this.btn_score_sort, ()=>{
-            
+            this.is_sort_up_status = !this.is_sort_up_status
+            this.updateSortStatus(true)
         })
         this.onButtonListen(this.btn_jiesuo, ()=>{
-            this.is_jiesuo = !this.is_jiesuo
-            this.updateJiesuoStatus()
+            this.is_jiesuo_status = !this.is_jiesuo_status
+            this.updateJiesuoStatus(true)
         })        
     }
 
@@ -54,6 +60,8 @@ export class car_lib_bottom extends base_ui {
         this.num_current_count = 1
         this.num_total_count = 1
 
+        this.data_list = JSON.parse(JSON.stringify(tools.all_car_list))
+        this.updateSortStatus()
         this.updateJiesuoStatus()
         this.updateNumStatus()
         this.initListContentData()
@@ -68,11 +76,26 @@ export class car_lib_bottom extends base_ui {
         }
     }
 
-    updateJiesuoStatus() {
-        if(this.is_jiesuo) {
-            this.btn_jiesuo.getComponent(Sprite).spriteFrame = this.sf_yijiesuo
+    updateSortStatus(is_load_data:boolean=false) {
+        if(this.is_sort_up_status) {
+            this.btn_score_sort.getComponent(Sprite).spriteFrame = this.sf_score_down
         } else {
-            this.btn_jiesuo.getComponent(Sprite).spriteFrame = this.sf_weijiesuo
+            this.btn_score_sort.getComponent(Sprite).spriteFrame = this.sf_score_up
+        }
+        if(is_load_data) {
+            this.data_list = this.data_list.reverse()
+            this.initListContentData()
+        }
+    }
+
+    updateJiesuoStatus(is_load_data:boolean=false) {
+        if(this.is_jiesuo_status) {
+            this.btn_jiesuo.getComponent(Sprite).spriteFrame = this.sf_jiesuo_select
+        } else {
+            this.btn_jiesuo.getComponent(Sprite).spriteFrame = this.sf_jiesuo_unselect
+        }
+        if(is_load_data) {
+            this.initListContentData()
         }
     }
 
@@ -82,17 +105,33 @@ export class car_lib_bottom extends base_ui {
 
     initListContentData() {
         this.list_content.removeAllChildren()
-        for (let index = 0; index < tools.all_car_list.length; index++) {
-            const element = tools.all_car_list[index];
-            let item = instantiate(this.list_item)
-            item.parent = this.list_content
-            let item_component = item.getComponent(car_lib_list_item)
-            item_component.initView(element, index, this.onClickListItem.bind(this))
-            if(userDataManager.user_car_list.default_car_id == element.id) {
-                this.current_select_list_item = item_component
-                item_component.setSelectedStatus()
+        this.current_select_list_item = null
+        for (let index = 0; index < this.data_list.length; index++) {
+            const element = this.data_list[index];
+            let is_jiesuo = userDataManager.user_car_list.car_list.some(obj => obj === element.id)
+            let item = null
+            if(this.is_jiesuo_status) {
+                if(is_jiesuo) {
+                    item = instantiate(this.list_item)
+                }
             } else {
-                item_component.setUnselectedStatus()
+                item = instantiate(this.list_item)
+            }
+            if(item!=null) {
+                item.parent = this.list_content
+                let item_component = item.getComponent(car_lib_list_item)
+                item_component.initView(element, index, this.onClickListItem.bind(this))
+                if(is_jiesuo) {
+                    item_component.setJiesuoSelectedStatus()
+                } else {
+                    item_component.setJiesuoUnselectedStatus()
+                }
+                if(userDataManager.user_car_list.default_car_id == element.id) {
+                    this.current_select_list_item = item_component
+                    item_component.setSelectedStatus()
+                } else {
+                    item_component.setUnselectedStatus()
+                }
             }
         }
     }
@@ -102,6 +141,11 @@ export class car_lib_bottom extends base_ui {
             return
         }
 
+        if(item.getIsJiesuo()==false) {
+            console.log('解锁 解锁 解锁')
+            return
+        }
+
         this.current_select_list_item.setUnselectedStatus()
         item.setSelectedStatus()
         this.current_select_list_item = item

+ 10 - 2
assets/script/ui/car_lib/car_lib_list_item.ts

@@ -33,8 +33,6 @@ export class car_lib_list_item extends Component {
         this.img_car.getComponent(Sprite).spriteFrame = imageCacheManager.getHomeCarImageById(data.id)
         this.lab_car_name.getComponent(Label).string = data.name
         this.lab_car_score.getComponent(Label).string = data.unlock_points + '分'
-        this.is_jiesuo = userDataManager.user_car_list.car_list.some(obj => obj === data.id)
-        this.suo_node.active = !this.is_jiesuo
         this.lab_suo_score.getComponent(Label).string = data.unlock_points + '分'
     }
 
@@ -50,6 +48,16 @@ export class car_lib_list_item extends Component {
         return this.m_index
     }
 
+    public setJiesuoSelectedStatus() {
+        this.is_jiesuo = true
+        this.suo_node.active = false
+    }
+
+    public setJiesuoUnselectedStatus() {
+        this.is_jiesuo = false
+        this.suo_node.active = true
+    }
+
     public setSelectedStatus() {
         this.node.getComponent(Sprite).spriteFrame = this.sf_bg_select
     }

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

@@ -40,7 +40,7 @@ export class home extends Component {
     onUpdateUserDefaultCar() {
         this.home_car.getComponent(home_car).updateCar()
     }
-    
+
     public init(){
         this.home_car.getComponent(home_car).updateCar()
         this.top.getComponent(home_top).init()

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


+ 8 - 8
assets/texture/ui/car_lib/car_lib_yijiesuo.png.meta → assets/texture/ui/car_lib/car_lib_jiesuo_select.png.meta

@@ -2,7 +2,7 @@
   "ver": "1.0.26",
   "importer": "image",
   "imported": true,
-  "uuid": "07d957d3-e7bc-4d5f-aab7-961fa89cbc33",
+  "uuid": "fd60d1c7-8a62-41d2-b3fa-3dea49199761",
   "files": [
     ".json",
     ".png"
@@ -10,14 +10,14 @@
   "subMetas": {
     "6c48a": {
       "importer": "texture",
-      "uuid": "07d957d3-e7bc-4d5f-aab7-961fa89cbc33@6c48a",
-      "displayName": "car_lib_yijiesuo",
+      "uuid": "fd60d1c7-8a62-41d2-b3fa-3dea49199761@6c48a",
+      "displayName": "car_lib_jiesuo_select",
       "id": "6c48a",
       "name": "texture",
       "userData": {
         "wrapModeS": "clamp-to-edge",
         "wrapModeT": "clamp-to-edge",
-        "imageUuidOrDatabaseUri": "07d957d3-e7bc-4d5f-aab7-961fa89cbc33",
+        "imageUuidOrDatabaseUri": "fd60d1c7-8a62-41d2-b3fa-3dea49199761",
         "isUuid": true,
         "visible": false,
         "minfilter": "linear",
@@ -34,8 +34,8 @@
     },
     "f9941": {
       "importer": "sprite-frame",
-      "uuid": "07d957d3-e7bc-4d5f-aab7-961fa89cbc33@f9941",
-      "displayName": "car_lib_yijiesuo",
+      "uuid": "fd60d1c7-8a62-41d2-b3fa-3dea49199761@f9941",
+      "displayName": "car_lib_jiesuo_select",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {
@@ -114,7 +114,7 @@
           ]
         },
         "isUuid": true,
-        "imageUuidOrDatabaseUri": "07d957d3-e7bc-4d5f-aab7-961fa89cbc33@6c48a",
+        "imageUuidOrDatabaseUri": "fd60d1c7-8a62-41d2-b3fa-3dea49199761@6c48a",
         "atlasUuid": ""
       },
       "ver": "1.0.12",
@@ -129,6 +129,6 @@
     "type": "sprite-frame",
     "hasAlpha": true,
     "fixAlphaTransparencyArtifacts": false,
-    "redirect": "07d957d3-e7bc-4d5f-aab7-961fa89cbc33@f9941"
+    "redirect": "fd60d1c7-8a62-41d2-b3fa-3dea49199761@f9941"
   }
 }

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


+ 8 - 8
assets/texture/ui/car_lib/car_lib_weijiesuo.png.meta → assets/texture/ui/car_lib/car_lib_jiesuo_unselect.png.meta

@@ -2,7 +2,7 @@
   "ver": "1.0.26",
   "importer": "image",
   "imported": true,
-  "uuid": "a16b13f2-f4e2-4e40-90dc-13b7f4e4fcc6",
+  "uuid": "b1bd300f-37ee-4bfe-9648-2cbd012a8397",
   "files": [
     ".json",
     ".png"
@@ -10,14 +10,14 @@
   "subMetas": {
     "6c48a": {
       "importer": "texture",
-      "uuid": "a16b13f2-f4e2-4e40-90dc-13b7f4e4fcc6@6c48a",
-      "displayName": "car_lib_weijiesuo",
+      "uuid": "b1bd300f-37ee-4bfe-9648-2cbd012a8397@6c48a",
+      "displayName": "car_lib_jiesuo_unselect",
       "id": "6c48a",
       "name": "texture",
       "userData": {
         "wrapModeS": "clamp-to-edge",
         "wrapModeT": "clamp-to-edge",
-        "imageUuidOrDatabaseUri": "a16b13f2-f4e2-4e40-90dc-13b7f4e4fcc6",
+        "imageUuidOrDatabaseUri": "b1bd300f-37ee-4bfe-9648-2cbd012a8397",
         "isUuid": true,
         "visible": false,
         "minfilter": "linear",
@@ -34,8 +34,8 @@
     },
     "f9941": {
       "importer": "sprite-frame",
-      "uuid": "a16b13f2-f4e2-4e40-90dc-13b7f4e4fcc6@f9941",
-      "displayName": "car_lib_weijiesuo",
+      "uuid": "b1bd300f-37ee-4bfe-9648-2cbd012a8397@f9941",
+      "displayName": "car_lib_jiesuo_unselect",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {
@@ -114,7 +114,7 @@
           ]
         },
         "isUuid": true,
-        "imageUuidOrDatabaseUri": "a16b13f2-f4e2-4e40-90dc-13b7f4e4fcc6@6c48a",
+        "imageUuidOrDatabaseUri": "b1bd300f-37ee-4bfe-9648-2cbd012a8397@6c48a",
         "atlasUuid": ""
       },
       "ver": "1.0.12",
@@ -129,6 +129,6 @@
     "type": "sprite-frame",
     "hasAlpha": true,
     "fixAlphaTransparencyArtifacts": false,
-    "redirect": "a16b13f2-f4e2-4e40-90dc-13b7f4e4fcc6@f9941"
+    "redirect": "b1bd300f-37ee-4bfe-9648-2cbd012a8397@f9941"
   }
 }

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


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

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "e36e189a-fbf8-48d9-9120-fda4f108d34e",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "e36e189a-fbf8-48d9-9120-fda4f108d34e@6c48a",
+      "displayName": "car_lib_score_down",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "e36e189a-fbf8-48d9-9120-fda4f108d34e",
+        "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": "e36e189a-fbf8-48d9-9120-fda4f108d34e@f9941",
+      "displayName": "car_lib_score_down",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 283,
+        "height": 84,
+        "rawWidth": 283,
+        "rawHeight": 84,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -141.5,
+            -42,
+            0,
+            141.5,
+            -42,
+            0,
+            -141.5,
+            42,
+            0,
+            141.5,
+            42,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            84,
+            283,
+            84,
+            0,
+            0,
+            283,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -141.5,
+            -42,
+            0
+          ],
+          "maxPos": [
+            141.5,
+            42,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "e36e189a-fbf8-48d9-9120-fda4f108d34e@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "e36e189a-fbf8-48d9-9120-fda4f108d34e@f9941"
+  }
+}

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


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


+ 28 - 28
assets/texture/ui/car_lib/car_lib_score_sort.png.meta → assets/texture/ui/car_lib/car_lib_score_up.png.meta

@@ -2,7 +2,7 @@
   "ver": "1.0.26",
   "importer": "image",
   "imported": true,
-  "uuid": "53f2352a-1d68-42fb-8783-5a7f33f07c0c",
+  "uuid": "e7c25ef4-3e5b-4e8a-8144-99004196a359",
   "files": [
     ".json",
     ".png"
@@ -10,14 +10,14 @@
   "subMetas": {
     "6c48a": {
       "importer": "texture",
-      "uuid": "53f2352a-1d68-42fb-8783-5a7f33f07c0c@6c48a",
-      "displayName": "car_lib_score_sort",
+      "uuid": "e7c25ef4-3e5b-4e8a-8144-99004196a359@6c48a",
+      "displayName": "car_lib_score_up",
       "id": "6c48a",
       "name": "texture",
       "userData": {
         "wrapModeS": "clamp-to-edge",
         "wrapModeT": "clamp-to-edge",
-        "imageUuidOrDatabaseUri": "53f2352a-1d68-42fb-8783-5a7f33f07c0c",
+        "imageUuidOrDatabaseUri": "e7c25ef4-3e5b-4e8a-8144-99004196a359",
         "isUuid": true,
         "visible": false,
         "minfilter": "linear",
@@ -34,8 +34,8 @@
     },
     "f9941": {
       "importer": "sprite-frame",
-      "uuid": "53f2352a-1d68-42fb-8783-5a7f33f07c0c@f9941",
-      "displayName": "car_lib_score_sort",
+      "uuid": "e7c25ef4-3e5b-4e8a-8144-99004196a359@f9941",
+      "displayName": "car_lib_score_up",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {
@@ -46,10 +46,10 @@
         "offsetY": 0,
         "trimX": 0,
         "trimY": 0,
-        "width": 258,
-        "height": 72,
-        "rawWidth": 258,
-        "rawHeight": 72,
+        "width": 283,
+        "height": 84,
+        "rawWidth": 283,
+        "rawHeight": 84,
         "borderTop": 0,
         "borderBottom": 0,
         "borderLeft": 0,
@@ -61,17 +61,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -129,
-            -36,
+            -141.5,
+            -42,
             0,
-            129,
-            -36,
+            141.5,
+            -42,
             0,
-            -129,
-            36,
+            -141.5,
+            42,
             0,
-            129,
-            36,
+            141.5,
+            42,
             0
           ],
           "indexes": [
@@ -84,12 +84,12 @@
           ],
           "uv": [
             0,
-            72,
-            258,
-            72,
+            84,
+            283,
+            84,
             0,
             0,
-            258,
+            283,
             0
           ],
           "nuv": [
@@ -103,18 +103,18 @@
             1
           ],
           "minPos": [
-            -129,
-            -36,
+            -141.5,
+            -42,
             0
           ],
           "maxPos": [
-            129,
-            36,
+            141.5,
+            42,
             0
           ]
         },
         "isUuid": true,
-        "imageUuidOrDatabaseUri": "53f2352a-1d68-42fb-8783-5a7f33f07c0c@6c48a",
+        "imageUuidOrDatabaseUri": "e7c25ef4-3e5b-4e8a-8144-99004196a359@6c48a",
         "atlasUuid": ""
       },
       "ver": "1.0.12",
@@ -129,6 +129,6 @@
     "type": "sprite-frame",
     "hasAlpha": true,
     "fixAlphaTransparencyArtifacts": false,
-    "redirect": "53f2352a-1d68-42fb-8783-5a7f33f07c0c@f9941"
+    "redirect": "e7c25ef4-3e5b-4e8a-8144-99004196a359@f9941"
   }
 }

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


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

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "f90e8ccf-60e8-4b79-a81a-8226e223ab88",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "f90e8ccf-60e8-4b79-a81a-8226e223ab88@6c48a",
+      "displayName": "car_lib_title",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "f90e8ccf-60e8-4b79-a81a-8226e223ab88",
+        "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": "f90e8ccf-60e8-4b79-a81a-8226e223ab88@f9941",
+      "displayName": "car_lib_title",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 1080,
+        "height": 173,
+        "rawWidth": 1080,
+        "rawHeight": 173,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -540,
+            -86.5,
+            0,
+            540,
+            -86.5,
+            0,
+            -540,
+            86.5,
+            0,
+            540,
+            86.5,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            173,
+            1080,
+            173,
+            0,
+            0,
+            1080,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -540,
+            -86.5,
+            0
+          ],
+          "maxPos": [
+            540,
+            86.5,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "f90e8ccf-60e8-4b79-a81a-8226e223ab88@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "f90e8ccf-60e8-4b79-a81a-8226e223ab88@f9941"
+  }
+}

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


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