future před 1 rokem
rodič
revize
7933451fa9

+ 3 - 0
assets/resources/ui/car_lib.prefab

@@ -3462,6 +3462,9 @@
     "lab_region": {
       "__id__": 65
     },
+    "img_region_edit": {
+      "__id__": 71
+    },
     "lab_max_score": {
       "__id__": 117
     },

+ 1 - 0
assets/script/data.ts

@@ -117,6 +117,7 @@ export class sysConfig{
     public share_number:number = 0     //今日分享次数
     public share_des:string = ''       //分享描述
     public game_end_prompt:string[] = []     //游戏结束提示
+    public k_region:number = 0         //0关1开
 }
 
 export class user_free_ads_data{

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

@@ -1,4 +1,4 @@
-import { _decorator, Component, Label, Node, Sprite } from 'cc';
+import { _decorator, Button, Component, Label, Node, Sprite } from 'cc';
 import { userDataManager } from '../../manager/userDataManager';
 import { tools } from '../../tools';
 import { GameManager } from '../../GameManager';
@@ -17,11 +17,14 @@ export class car_lib_top extends Component {
     @property(Node) lab_car_pai:Node = null
     @property(Node) btn_region:Node = null
     @property(Node) lab_region:Node = null
+    @property(Node) img_region_edit:Node = null
     @property(Node) lab_max_score:Node = null
     @property(Node) img_car:Node = null
 
     protected start(): void {
         uiManager.Instance().onButtonListen(this.btn_region,()=>{
+            if(tools.sys_config.k_region==0) { return }
+            
             if(userDataManager.user_data.update_region_status==1) {
                 uiManager.Instance().showUi(config.UI.ui_tips_view)
                 return
@@ -30,6 +33,11 @@ export class car_lib_top extends Component {
                 node.getComponent(select_area).initView(true, this.onSelectArea.bind(this))
             })
         })
+
+        if(tools.sys_config.k_region==0) {
+            this.btn_region.getComponent(Button).interactable = false
+            this.img_region_edit.active = false
+        }
     }
 
     init() {