future 1 år sedan
förälder
incheckning
c4ceb3451e

+ 162 - 162
assets/scene/game.scene

@@ -11212,7 +11212,7 @@
         "__id__": 329
       }
     ],
-    "_active": false,
+    "_active": true,
     "_components": [
       {
         "__id__": 333
@@ -11371,7 +11371,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "img_back",
+    "_name": "level_list",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -11396,8 +11396,8 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -421.628,
-      "y": -145,
+      "x": 0,
+      "y": -50,
       "z": 0
     },
     "_lrot": {
@@ -11421,7 +11421,7 @@
       "y": 0,
       "z": 0
     },
-    "_id": "27ZLmX2gVMTbIhuCPKnvYL"
+    "_id": "86kzRKUeJO5qxE39FUZ52V"
   },
   {
     "__type__": "cc.UITransform",
@@ -11435,57 +11435,18 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 165,
-      "height": 90
+      "width": 1000,
+      "height": 1800
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
       "x": 0.5,
-      "y": 0.5
-    },
-    "_id": "5c761J4eRNxoA12mOEeaQP"
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 319
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_spriteFrame": {
-      "__uuid__": "05f4201b-db63-41da-974d-8d3ea07fcf50@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
-    "_type": 0,
-    "_fillType": 0,
-    "_sizeMode": 1,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
+      "y": 1
     },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_useGrayscale": false,
-    "_atlas": null,
-    "_id": "bbQWfwOj5K8aYB3f/MIw3w"
+    "_id": "c18ifhoPpH0okP//pI/HXL"
   },
   {
-    "__type__": "cc.Button",
+    "__type__": "cc.Layout",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
@@ -11494,45 +11455,27 @@
     },
     "_enabled": true,
     "__prefab": null,
-    "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
+    "_resizeMode": 0,
+    "_layoutType": 3,
+    "_cellSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 40
     },
-    "_normalSprite": null,
-    "_hoverSprite": null,
-    "_pressedSprite": null,
-    "_disabledSprite": null,
-    "_duration": 0.1,
-    "_zoomScale": 0.9,
-    "_target": null,
-    "_id": "05fkex7wBEKYQ5xWA29lSA"
+    "_startAxis": 0,
+    "_paddingLeft": 50,
+    "_paddingRight": 0,
+    "_paddingTop": 200,
+    "_paddingBottom": 0,
+    "_spacingX": 150,
+    "_spacingY": 50,
+    "_verticalDirection": 1,
+    "_horizontalDirection": 0,
+    "_constraint": 2,
+    "_constraintNum": 2,
+    "_affectedByScale": false,
+    "_isAlign": false,
+    "_id": "ce3/9C/19Dt4DuGBVUuoOJ"
   },
   {
     "__type__": "cc.Widget",
@@ -11548,8 +11491,8 @@
     "_target": null,
     "_left": 0,
     "_right": 0,
-    "_top": 100,
-    "_bottom": 0,
+    "_top": 50,
+    "_bottom": 300,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
@@ -11559,14 +11502,50 @@
     "_isAbsHorizontalCenter": true,
     "_isAbsVerticalCenter": true,
     "_originalWidth": 0,
-    "_originalHeight": 0,
+    "_originalHeight": 1400,
     "_alignMode": 2,
     "_lockFlags": 0,
-    "_id": "b7nCwgHo1Kir/TkBhthdW1"
+    "_id": "a2RtS8vn5ANIv4/9N2R3Q5"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 319
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": null,
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": "bfjx1p4qRMp4/8GI5557vt"
   },
   {
     "__type__": "cc.Node",
-    "_name": "level_list",
+    "_name": "img_back",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -11591,8 +11570,8 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
-      "y": -50,
+      "x": -421.628,
+      "y": -145,
       "z": 0
     },
     "_lrot": {
@@ -11616,7 +11595,7 @@
       "y": 0,
       "z": 0
     },
-    "_id": "86kzRKUeJO5qxE39FUZ52V"
+    "_id": "27ZLmX2gVMTbIhuCPKnvYL"
   },
   {
     "__type__": "cc.UITransform",
@@ -11630,18 +11609,18 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1000,
-      "height": 1800
+      "width": 165,
+      "height": 90
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
       "x": 0.5,
-      "y": 1
+      "y": 0.5
     },
-    "_id": "c18ifhoPpH0okP//pI/HXL"
+    "_id": "5c761J4eRNxoA12mOEeaQP"
   },
   {
-    "__type__": "cc.Layout",
+    "__type__": "cc.Sprite",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
@@ -11650,27 +11629,84 @@
     },
     "_enabled": true,
     "__prefab": null,
-    "_resizeMode": 0,
-    "_layoutType": 3,
-    "_cellSize": {
-      "__type__": "cc.Size",
-      "width": 40,
-      "height": 40
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
     },
-    "_startAxis": 0,
-    "_paddingLeft": 50,
-    "_paddingRight": 0,
-    "_paddingTop": 200,
-    "_paddingBottom": 0,
-    "_spacingX": 150,
-    "_spacingY": 50,
-    "_verticalDirection": 1,
-    "_horizontalDirection": 0,
-    "_constraint": 2,
-    "_constraintNum": 2,
-    "_affectedByScale": false,
-    "_isAlign": false,
-    "_id": "ce3/9C/19Dt4DuGBVUuoOJ"
+    "_spriteFrame": {
+      "__uuid__": "05f4201b-db63-41da-974d-8d3ea07fcf50@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": "bbQWfwOj5K8aYB3f/MIw3w"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 324
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "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": "05fkex7wBEKYQ5xWA29lSA"
   },
   {
     "__type__": "cc.Widget",
@@ -11686,8 +11722,8 @@
     "_target": null,
     "_left": 0,
     "_right": 0,
-    "_top": 50,
-    "_bottom": 300,
+    "_top": 100,
+    "_bottom": 0,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
@@ -11697,46 +11733,10 @@
     "_isAbsHorizontalCenter": true,
     "_isAbsVerticalCenter": true,
     "_originalWidth": 0,
-    "_originalHeight": 1400,
+    "_originalHeight": 0,
     "_alignMode": 2,
     "_lockFlags": 0,
-    "_id": "a2RtS8vn5ANIv4/9N2R3Q5"
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 324
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_spriteFrame": null,
-    "_type": 1,
-    "_fillType": 0,
-    "_sizeMode": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_useGrayscale": false,
-    "_atlas": null,
-    "_id": "bfjx1p4qRMp4/8GI5557vt"
+    "_id": "b7nCwgHo1Kir/TkBhthdW1"
   },
   {
     "__type__": "cc.Node",
@@ -11982,13 +11982,13 @@
     "_enabled": true,
     "__prefab": null,
     "btn_back": {
-      "__id__": 319
+      "__id__": 324
     },
     "lab_cur_select_page": {
       "__id__": 329
     },
     "content": {
-      "__id__": 324
+      "__id__": 319
     },
     "game_level_item": {
       "__uuid__": "0fd542eb-fb87-4fed-8dd4-5a9e9ebe3aa3",

+ 3 - 0
assets/script/run/game_list_view/game_list.ts

@@ -39,7 +39,9 @@ export class game_list extends Component {
         ClientEvent.off(config.EventRun.WIN_LATER_AUTO_UNLOCK_NEXT_LEVEL,this.autoUnlockNextLevel.bind(this),this)
         ClientEvent.on(config.EventRun.WIN_LATER_AUTO_UNLOCK_NEXT_LEVEL,this.autoUnlockNextLevel.bind(this),this)
         this.loadView()
+    }
 
+    public initContentPosition() {
         let content_position_y = (this.node.getComponent(UITransform).height - this.content.getComponent(UITransform).height) / 2
         this.content.setPosition(this.content.position.x, -content_position_y, 1)
     }
@@ -51,6 +53,7 @@ export class game_list extends Component {
             if(!err){
                 let msg:LevelMessage  = JSON.parse(data)
                 this.initGameList(msg)
+                this.initContentPosition()
                 if(this.m_loading_finish_call!=null){
                     this.m_loading_finish_call()
                 }

+ 4 - 4
assets/script/run/zb_login_view/zb_login_view.ts

@@ -40,11 +40,11 @@ export class zb_login_view extends Component {
         password_string = tools.trimLeftAndRightblank(password_string)
 
         if (account_string == '') {
-            tools.showToast("请输入账号");
+            tools.showToast("请输入账号", true);
             return
         }
         if (password_string == '') {
-            tools.showToast("请输入密码");
+            tools.showToast("请输入密码", true);
             return
         }
 
@@ -58,14 +58,14 @@ export class zb_login_view extends Component {
                 if(_data.code==config.MSG_CODE.SUCCESS){
                     let openid = _data.content.openid
                     if (openid == "" || openid == null || openid == undefined) {
-                        tools.showToast('获取主播id失败')
+                        tools.showToast('获取主播id失败', true)
                     } else {
                         gameManager.setZbOpenid(openid)
                         callback()
                     }
                 } else{
                     let msg = _data['message']
-                    tools.showToast(msg)
+                    tools.showToast(msg, true)
                 }
             }
         })

+ 4 - 1
assets/script/tools.ts

@@ -12,7 +12,10 @@ export class tools  {
         //     node.getComponent(dialog_view).show(title,sure_callback,cancel_callback)
         // })
     }
-    public static showToast(text:string){
+    public static showToast(text:string, isShow:boolean=false){
+        if(isShow==false) {
+            return
+        }
         resources.load("prefab/run/toast",Prefab,(err, prefab)=>{
             let node = instantiate(prefab);
             // node.parent = main.g_canvas.node;