Browse Source

抢夺好友引导需要添加额外的判断逻辑:如果好友列表第一个为老板,则需要再判断除老板以外的好友,否则直接显示引导好友列表第一条

sa03 6 years ago
parent
commit
56aec8288f

+ 23 - 23
assets/resources/prefabs/artist_resident_item.prefab

@@ -402,8 +402,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 129,
-      "height": 26
+      "width": 139,
+      "height": 28
     },
     "_rotationX": 0,
     "_rotationY": 0,
@@ -429,12 +429,12 @@
       "__id__": 11
     },
     "_enabled": true,
-    "_N$string": "<color=#584a47>酷拉皮卡</c> <img src='50002'/>",
+    "_N$string": "<color=#554744>酷拉皮卡</c> <img src='50002'/>",
     "_N$horizontalAlign": 0,
-    "_N$fontSize": 24,
+    "_N$fontSize": 26,
     "_N$font": null,
     "_N$maxWidth": 0,
-    "_N$lineHeight": 26,
+    "_N$lineHeight": 28,
     "_N$imageAtlas": {
       "__uuid__": "d1642694-596d-4edd-a649-0c01f704e8b0"
     },
@@ -486,8 +486,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 55,
-      "height": 51
+      "width": 52,
+      "height": 58
     },
     "_rotationX": 0,
     "_rotationY": 0,
@@ -514,7 +514,7 @@
     },
     "_enabled": true,
     "_spriteFrame": {
-      "__uuid__": "bddf27cd-4a2e-4882-9101-8bda29e9fd59"
+      "__uuid__": "d70fee61-65c6-4d34-a71b-0557eba384b1"
     },
     "_type": 0,
     "_sizeMode": 1,
@@ -590,7 +590,7 @@
     "_position": {
       "__type__": "cc.Vec2",
       "x": -151,
-      "y": 11
+      "y": 14.4
     },
     "_skewX": 0,
     "_skewY": 0,
@@ -674,9 +674,9 @@
     "_opacity": 255,
     "_color": {
       "__type__": "cc.Color",
-      "r": 211,
-      "g": 78,
-      "b": 5,
+      "r": 214,
+      "g": 77,
+      "b": 9,
       "a": 255
     },
     "_cascadeOpacityEnabled": true,
@@ -688,7 +688,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 148,
-      "height": 24
+      "height": 28
     },
     "_rotationX": 0,
     "_rotationY": 0,
@@ -717,7 +717,7 @@
     "_useOriginalSize": false,
     "_actualFontSize": 24,
     "_fontSize": 24,
-    "_lineHeight": 24,
+    "_lineHeight": 28,
     "_enableWrapText": true,
     "_N$file": null,
     "_isSystemFontUsed": true,
@@ -839,9 +839,9 @@
     "_opacity": 255,
     "_color": {
       "__type__": "cc.Color",
-      "r": 88,
-      "g": 74,
-      "b": 71,
+      "r": 91,
+      "g": 80,
+      "b": 74,
       "a": 255
     },
     "_cascadeOpacityEnabled": true,
@@ -852,8 +852,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 244,
-      "height": 22
+      "width": 267,
+      "height": 24
     },
     "_rotationX": 0,
     "_rotationY": 0,
@@ -880,9 +880,9 @@
     },
     "_enabled": true,
     "_useOriginalSize": false,
-    "_actualFontSize": 22,
-    "_fontSize": 22,
-    "_lineHeight": 22,
+    "_actualFontSize": 24,
+    "_fontSize": 24,
+    "_lineHeight": 24,
     "_enableWrapText": true,
     "_N$file": null,
     "_isSystemFontUsed": true,
@@ -904,7 +904,7 @@
     "alignMode": 1,
     "_target": null,
     "_alignFlags": 10,
-    "_left": 20,
+    "_left": 8.5,
     "_right": 0,
     "_top": 0,
     "_bottom": 0,

+ 2 - 1
assets/scripts/friendlist/FriendList.js

@@ -54,7 +54,8 @@ cc.Class({
             });
 
             // 尝试触发抢夺好友引导
-            GameModule.homeGuide.getComponent('HomeGuide').handleGuideState14(GameModule.tab.getComponent('Tab').friends)
+            let friends = GameModule.tab.getComponent('Tab').friends
+            GameModule.homeGuide.getComponent('HomeGuide').handleGuideState14(friends)
         }
 
         this.listAdapter = new ListViewAdapter(this.scrollView);

+ 15 - 5
assets/scripts/levelHome/HomeGuide.js

@@ -311,10 +311,8 @@ cc.Class({
                 }, 300)
             } else if(this.curState == 'state14') {
                 // 跳转userinfo界面
-                let tab = GameModule.tab.getComponent('Tab')
-                if(tab.friends && tab.friends.length > 0) {
-                    let uid = tab.friends[0].uid
-                    this.game.gameFSM.showuserinfo(uid)
+                if(this.guideState.state14.uid) {
+                    this.game.gameFSM.showuserinfo(this.guideState.state14.uid)
                 }
                 this.handlePass(this.curState)
             } else if(this.curState == 'state18') {
@@ -1028,9 +1026,21 @@ cc.Class({
      * @param {Array} list 好友列表数组
      */
     handleGuideState14 (list) {
+
         // 好友数量大于0,同时已经完成了state7,触发抢夺好友引导state14
         if(list && list.length > 0 && this.guideState.state7.pass) {
-            this.handleState('state14')
+            // 如果好友列表第一个为老板,则需要再判断除老板以外的好友
+            if(list[0].role == 1) {
+                if(list.length >= 2) {
+                    this.guideState.state14.pos = [0, -53]
+                    this.guideState.state14.uid = list[1].uid
+                    this.handleState('state14')
+                }
+            } else {
+                // 如果好友列表第一个不是老板,则直接显示引导好友列表第一条
+                this.guideState.state14.uid = list[0].uid
+                this.handleState('state14')
+            }
         }
     },