future 1 年之前
父節點
當前提交
e68681faf4

+ 16 - 19
assets/resources/prefabs/game_play_ji_yi_li.prefab

@@ -468,7 +468,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 8.895788639149767,
+      "width": 8.89551528828256,
       "height": 20.16
     },
     "_anchorPoint": {
@@ -507,7 +507,7 @@
     "_string": "0",
     "_horizontalAlign": 0,
     "_verticalAlign": 1,
-    "_actualFontSize": 22.226600985221676,
+    "_actualFontSize": 23.48768472906404,
     "_fontSize": 16,
     "_fontFamily": "Arial",
     "_lineHeight": 16,
@@ -1105,7 +1105,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 0,
+      "y": -10,
       "z": 0
     },
     "_lrot": {
@@ -1145,7 +1145,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 179.97892826161484,
+      "width": 179.94104085832635,
       "height": 25.2
     },
     "_anchorPoint": {
@@ -1184,7 +1184,7 @@
     "_string": "请记下图中全部细节",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 27.783251231527096,
+    "_actualFontSize": 29.35960591133005,
     "_fontSize": 20,
     "_fontFamily": "Arial",
     "_lineHeight": 20,
@@ -1551,7 +1551,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 239.9719043488198,
+      "width": 239.92138088149514,
       "height": 25.2
     },
     "_anchorPoint": {
@@ -1590,7 +1590,7 @@
     "_string": "问:图中有几个圣诞老人?",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 27.783251231527096,
+    "_actualFontSize": 29.35960591133005,
     "_fontSize": 20,
     "_fontFamily": "Arial",
     "_lineHeight": 20,
@@ -2575,8 +2575,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 14.515682247513574,
-      "height": 37.8
+      "width": 14.51935884616519,
+      "height": 37.800000000000004
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2614,7 +2614,7 @@
     "_string": "-",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 33.33990147783251,
+    "_actualFontSize": 35.23152709359606,
     "_fontSize": 24,
     "_fontFamily": "YouSheBiaoTiHei-Bold",
     "_lineHeight": 30,
@@ -2711,8 +2711,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 51.22477949426529,
-      "height": 37.8
+      "width": 51.23774729479079,
+      "height": 37.800000000000004
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2750,7 +2750,7 @@
     "_string": "180s",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 33.33990147783251,
+    "_actualFontSize": 35.23152709359606,
     "_fontSize": 24,
     "_fontFamily": "YouSheBiaoTiHei-Bold",
     "_lineHeight": 30,
@@ -2847,8 +2847,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 14.515682247513574,
-      "height": 37.8
+      "width": 14.51935884616519,
+      "height": 37.800000000000004
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2886,7 +2886,7 @@
     "_string": "-",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 33.33990147783251,
+    "_actualFontSize": 35.23152709359606,
     "_fontSize": 24,
     "_fontFamily": "YouSheBiaoTiHei-Bold",
     "_lineHeight": 30,
@@ -3860,7 +3860,6 @@
     "btn_coin": {
       "__id__": 11
     },
-    "progressbar": null,
     "lab_title": {
       "__id__": 40
     },
@@ -3888,8 +3887,6 @@
     "top_node": {
       "__id__": 2
     },
-    "lab_time_count": null,
-    "clock_ani": null,
     "lab_countdown_time": {
       "__id__": 110
     },

+ 5 - 5
assets/resources/prefabs/unlock_play_dialog.prefab

@@ -392,8 +392,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 166.19032169395769,
-      "height": 37.8
+      "width": 166.20665746087195,
+      "height": 37.800000000000004
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -431,7 +431,7 @@
     "_string": "解锁美女找细节?",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 30.77832512315271,
+    "_actualFontSize": 32.29556650246305,
     "_fontSize": 22,
     "_fontFamily": "Arial",
     "_lineHeight": 30,
@@ -814,7 +814,7 @@
     "_string": "0",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 22.38423645320197,
+    "_actualFontSize": 23.48768472906404,
     "_fontSize": 16,
     "_fontFamily": "Arial",
     "_lineHeight": 20,
@@ -1293,7 +1293,7 @@
     "_string": "0/3",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 22.38423645320197,
+    "_actualFontSize": 23.48768472906404,
     "_fontSize": 16,
     "_fontFamily": "Arial",
     "_lineHeight": 20,

+ 7 - 31
assets/script/homepage/play_page_list_item.ts

@@ -44,9 +44,15 @@ export class play_page_list_item extends Component {
                 let data = gameManager.get_cur_level_by_categoryid(this.m_data.id);
                 let look_video_string = data.look_video_number + '/' + this.m_data.unlock_ads_number
                 node.getComponent(unlock_play_dialog).initView(`解锁${this.m_data.name}?`, this.m_data.coin_number, look_video_string, (dialog_view:unlock_play_dialog)=> {
+                    dialog_view.close()
                     if(gameManager.get_user_coin()>=this.m_data.coin_number){
+                        gameManager.sub_coin(this.m_data.coin_number);
+                        let data = gameManager.get_cur_level_by_categoryid(this.m_data.id);
+                        data.is_lock_game_play = 1;
+                        gameManager.set_unlock_levels_data(data);
+                        gameManager.sync_data((is_sync)=>{},config.sync_data_type.LEVELS)
+                        ClientEvent.dispatchEvent(config.EVENT_MSG.ON_UPDATE_HOME_VIEW)
                     } else {
-                        dialog_view.close()
                         this.showViewLack()
                     }
                 }, (dialog_view:unlock_play_dialog)=> {
@@ -105,36 +111,6 @@ export class play_page_list_item extends Component {
             } else {
                 this.mask_layer.active = true;
             }
-            // if(data.is_lock_game_play===1){
-            //     this.mask_layer.active = false;
-            // }else{
-            //     this.mask_layer.active = true;
-            // }
-            // if(gameManager.get_user_coin()>=this.m_data.coin_number){
-            //     this.btn_lock_coin.getComponent(Sprite).grayscale = false;
-            // }else{
-            //     this.btn_lock_coin.getComponent(Sprite).grayscale = true;
-            // }
-            // if(this.m_data.unlock_ads_number>0){
-            //     this.btn_lock_video.active = true;
-            //     this.lab_video_number.getComponent(Label).string = `${data.look_video_number}/${this.m_data.unlock_ads_number}`
-            // }else{
-            //     this.btn_lock_video.active = false;
-            // }
-            // this.lab_coin_number.getComponent(Label).string = this.m_data.coin_number+"";
-            // this.lab_cur_level.getComponent(Label).string = `${data.level}/${this.m_data.barrier_number}` 
-
-            // if(this.m_data.id===config.PLAY_TYPE.JI_YI_LI||this.m_data.id===config.PLAY_TYPE.DOU_DI_ZHU){
-            //     this.btn_sub_coin.active = true;
-            //     this.item_bg.active = false;
-            //     this.lab_consume_coin.getComponent(Label).string = `-${this.m_data.consume_coin}`
-            //     if(gameManager.get_user_coin()>=this.m_data.consume_coin){
-            //         this.btn_sub_coin.getComponent(Sprite).grayscale = false;
-            //     }else{
-            //         this.btn_sub_coin.getComponent(Sprite).grayscale = true;
-            //     }
-            // }
-
         }
     }
 }