Browse Source

修改tab全部好友

SunnyLinSD 6 years ago
parent
commit
bea4590c80
2 changed files with 230 additions and 144 deletions
  1. 222 137
      assets/scene/game.fire
  2. 8 7
      assets/scripts/Tab.js

File diff suppressed because it is too large
+ 222 - 137
assets/scene/game.fire


+ 8 - 7
assets/scripts/Tab.js

@@ -28,7 +28,9 @@ cc.Class({
 
         noArtistTipNode: cc.Node,
 
-        _currentTab: 0 
+        _currentTab: 0 ,
+
+        allFriendNode: cc.Node
 
     },
 
@@ -63,6 +65,9 @@ cc.Class({
             // this.friendScrollView.node.position = cc.v2(0, -250);
         }
         
+        this.allFriendNode.on(cc.Node.EventType.TOUCH_END, _.debounce(() => {
+            GameEvent.fire(Notikey.ShowFriendSystem);
+        }, 1000, true), this);
         
         
 
@@ -196,12 +201,8 @@ cc.Class({
             let item = cc.instantiate(this.friendItem);
 
             let scriptComponent = item.getComponent('LevelHomeFriendItem');
-            if (i === 0) {
-                scriptComponent.style = Style.AllFriend;
-            } else {
-                scriptComponent.style = Style.Friend; 
-                scriptComponent.setFriendInfo(this.friends[i-1]);
-            }
+            scriptComponent.style = Style.Friend; 
+            scriptComponent.setFriendInfo(this.friends[i]);
             this.friendScrollView.content.addChild(item);
         }
     },

Some files were not shown because too many files changed in this diff