Prechádzať zdrojové kódy

Merge branch '0.6' of http://svn.ouj.com:3000/DWG/allstar into 0.6

SunnyLinSD 6 rokov pred
rodič
commit
b30597c454

+ 10 - 5
allstarSubGame/assets/Script/ListViewAdapter.js

@@ -22,12 +22,17 @@ class ListViewAdapter {
         console.log(this.scriptName);
         let actualCount = this.dataList.length < this.spawnCount ? this.dataList.length : this.spawnCount;
         // let actualCount = this.dataList.length;
+        if (this.itemHeight > 0) {
+            this.bufferZone = this.scrollView.node.height / 2 + this.content.height / 2;
+            this.content.height = (this.itemHeight + this.spacing) * this.dataList.length;
+        }
         this.scriptItems = [];
         this.content.removeAllChildren();
-        for (let i = 0; i < actualCount; ++i) { // spawn items, we only need to do this once
+        for (let i = 0; i < actualCount; i++) { // spawn items, we only need to do this once
             let item = cc.instantiate(itemTemplate);
             if (this.itemHeight === 0) {
                 this.itemHeight = item.height; // get total content height
+                this.bufferZone = this.scrollView.node.height / 2 + this.content.height / 2;
                 this.content.height = (this.itemHeight + this.spacing) * this.dataList.length;
             }
             this.content.addChild(item);
@@ -58,16 +63,16 @@ class ListViewAdapter {
             let viewPos = this.getPositionInView(this.scriptItems[i].node);
             if (isDown) {
                 // if away from buffer zone and not reaching top of content
-                if (viewPos.y < -buffer && this.scriptItems[i].y + offset < 0) {
-                    this.scriptItems[i].node.setPositionY(this.scriptItems[i].y + offset);
+                if (viewPos.y < -buffer && this.scriptItems[i].node.y + offset < 0) {
+                    this.scriptItems[i].node.y = this.scriptItems[i].node.y + offset;
                     let itemScript = this.scriptItems[i];
                     let itemId = itemScript._itemId - this.scriptItems.length;
                     itemScript.updateItem(this.dataList[itemId], itemId);
                 }
             } else {
                 // if away from buffer zone and not reaching bottom of content
-                if (viewPos.y > buffer && this.scriptItems[i].y - offset > -this.content.height) {
-                    this.scriptItems[i].node.setPositionY(this.scriptItems[i].y - offset);
+                if (viewPos.y > buffer && this.scriptItems[i].node.y - offset > -this.content.height) {
+                    this.scriptItems[i].node.y = this.scriptItems[i].node.y - offset;
 
                     let itemScript = this.scriptItems[i];
                     let itemId = itemScript._itemId + scriptItems.length;

+ 7 - 1
allstarSubGame/assets/Script/WechatFriendList.js

@@ -137,7 +137,7 @@ cc.Class({
                 openIdList: ['selfOpenId'],
                 success: (userRes) => {
                     console.log('success', userRes.data)
-                    let userData = userRes.data[0];
+                    let myData = userRes.data[0];
                     //取出所有好友数据
                     wx.getFriendCloudStorage({
                         keyList: [key1],
@@ -159,6 +159,12 @@ cc.Class({
                                 return b_score - a_score;
                             });
 
+                            for (let i = 0; i < data.length; i++) {
+                                if (data[i].avatarUrl == myData.avatarUrl) {
+                                    data.splice(i, 1);
+                                }
+                            }
+
                             this.users = data;
 
                             this.listAdapter.updateItems(this.users, this.prefabRankItem, 'WechatFriendListItem');

+ 1 - 1
assets/prefabs/level_home_item.prefab

@@ -4050,7 +4050,7 @@
     },
     "_children": [],
     "_tag": -1,
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 132

+ 2 - 2
assets/prefabs/user_interaction.prefab

@@ -2210,7 +2210,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 65,
+      "width": 64,
       "height": 50
     },
     "_rotationX": 0,
@@ -8695,7 +8695,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 103,
+      "width": 102,
       "height": 34
     },
     "_rotationX": 0,

+ 0 - 0
assets/resources/artistOperation/artist_close.png


+ 0 - 0
assets/resources/artistOperation/artist_resident_effect_select.png


+ 420 - 58
assets/resources/prefabs/offline_grossIncome.prefab

@@ -23,18 +23,18 @@
         "__id__": 6
       },
       {
-        "__id__": 50
+        "__id__": 61
       }
     ],
     "_tag": -1,
     "_active": true,
     "_components": [
       {
-        "__id__": 53
+        "__id__": 64
       }
     ],
     "_prefab": {
-      "__id__": 54
+      "__id__": 65
     },
     "_id": "",
     "_opacity": 255,
@@ -200,20 +200,17 @@
       },
       {
         "__id__": 26
-      },
-      {
-        "__id__": 37
       }
     ],
     "_tag": -1,
     "_active": true,
     "_components": [
       {
-        "__id__": 48
+        "__id__": 59
       }
     ],
     "_prefab": {
-      "__id__": 49
+      "__id__": 60
     },
     "_id": "",
     "_opacity": 255,
@@ -829,7 +826,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "watch_video_btn",
+    "_name": "btn_wrap",
     "_objFlags": 0,
     "_parent": {
       "__id__": 6
@@ -839,21 +836,85 @@
         "__id__": 27
       },
       {
-        "__id__": 30
+        "__id__": 38
+      },
+      {
+        "__id__": 49
       }
     ],
     "_tag": -1,
     "_active": true,
     "_components": [
       {
-        "__id__": 33
+        "__id__": 57
+      }
+    ],
+    "_prefab": {
+      "__id__": 58
+    },
+    "_id": "",
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_cascadeOpacityEnabled": true,
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": -8,
+      "height": 200
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_scaleX": 1,
+    "_scaleY": 1,
+    "_position": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": -218
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_localZOrder": 0,
+    "_globalZOrder": 0,
+    "_opacityModifyRGB": false,
+    "groupIndex": 0
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "video_btn",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 26
+    },
+    "_children": [
+      {
+        "__id__": 28
       },
       {
+        "__id__": 31
+      }
+    ],
+    "_tag": -1,
+    "_active": false,
+    "_components": [
+      {
         "__id__": 34
+      },
+      {
+        "__id__": 35
       }
     ],
     "_prefab": {
-      "__id__": 36
+      "__id__": 37
     },
     "_id": "",
     "_opacity": 255,
@@ -882,7 +943,7 @@
     "_position": {
       "__type__": "cc.Vec2",
       "x": -128,
-      "y": -208
+      "y": 0
     },
     "_skewX": 0,
     "_skewY": 0,
@@ -896,18 +957,18 @@
     "_name": "Label",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 26
+      "__id__": 27
     },
     "_children": [],
     "_tag": -1,
     "_active": true,
     "_components": [
       {
-        "__id__": 28
+        "__id__": 29
       }
     ],
     "_prefab": {
-      "__id__": 29
+      "__id__": 30
     },
     "_id": "",
     "_opacity": 255,
@@ -950,7 +1011,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 27
+      "__id__": 28
     },
     "_enabled": true,
     "_useOriginalSize": false,
@@ -975,7 +1036,7 @@
     "asset": {
       "__uuid__": "3adcd9ac-e84f-4100-96c8-71a1d1687441"
     },
-    "fileId": "cf/m3Z9+RL66s60pXPLpcI",
+    "fileId": "45356gzeBJjah/tlkIVvXl",
     "sync": false
   },
   {
@@ -983,18 +1044,18 @@
     "_name": "watch_video_coin_richtext",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 26
+      "__id__": 27
     },
     "_children": [],
     "_tag": -1,
     "_active": true,
     "_components": [
       {
-        "__id__": 31
+        "__id__": 32
       }
     ],
     "_prefab": {
-      "__id__": 32
+      "__id__": 33
     },
     "_id": "",
     "_opacity": 255,
@@ -1037,7 +1098,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 30
+      "__id__": 31
     },
     "_enabled": true,
     "_N$string": "<img src='alert_coin'/><color=#ffffff> 0B</c>",
@@ -1059,7 +1120,7 @@
     "asset": {
       "__uuid__": "3adcd9ac-e84f-4100-96c8-71a1d1687441"
     },
-    "fileId": "7dMfo4WQlDlq0qiJodGIwG",
+    "fileId": "8b8f4kOetJ17rrJfzCfMid",
     "sync": false
   },
   {
@@ -1067,7 +1128,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 26
+      "__id__": 27
     },
     "_enabled": true,
     "_spriteFrame": {
@@ -1093,7 +1154,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 26
+      "__id__": 27
     },
     "_enabled": true,
     "transition": 1,
@@ -1115,7 +1176,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 35
+        "__id__": 36
       }
     ],
     "_N$interactable": true,
@@ -1153,7 +1214,7 @@
       "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
     },
     "_N$target": {
-      "__id__": 26
+      "__id__": 27
     }
   },
   {
@@ -1173,7 +1234,7 @@
     "asset": {
       "__uuid__": "3adcd9ac-e84f-4100-96c8-71a1d1687441"
     },
-    "fileId": "42oCHS/8tAPIkzA/6hO+4I",
+    "fileId": "e7yytwhS5BJ754/t0iBJbT",
     "sync": false
   },
   {
@@ -1181,28 +1242,28 @@
     "_name": "share_btn",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 6
+      "__id__": 26
     },
     "_children": [
       {
-        "__id__": 38
+        "__id__": 39
       },
       {
-        "__id__": 41
+        "__id__": 42
       }
     ],
     "_tag": -1,
-    "_active": true,
+    "_active": false,
     "_components": [
       {
-        "__id__": 44
+        "__id__": 45
       },
       {
-        "__id__": 45
+        "__id__": 46
       }
     ],
     "_prefab": {
-      "__id__": 47
+      "__id__": 48
     },
     "_id": "",
     "_opacity": 255,
@@ -1230,8 +1291,8 @@
     "_scaleY": 1,
     "_position": {
       "__type__": "cc.Vec2",
-      "x": 128,
-      "y": -208
+      "x": 0,
+      "y": 0
     },
     "_skewX": 0,
     "_skewY": 0,
@@ -1245,18 +1306,18 @@
     "_name": "Label",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 37
+      "__id__": 38
     },
     "_children": [],
     "_tag": -1,
     "_active": true,
     "_components": [
       {
-        "__id__": 39
+        "__id__": 40
       }
     ],
     "_prefab": {
-      "__id__": 40
+      "__id__": 41
     },
     "_id": "",
     "_opacity": 255,
@@ -1299,7 +1360,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 38
+      "__id__": 39
     },
     "_enabled": true,
     "_useOriginalSize": false,
@@ -1324,7 +1385,7 @@
     "asset": {
       "__uuid__": "3adcd9ac-e84f-4100-96c8-71a1d1687441"
     },
-    "fileId": "b44XcVLLpDdZKTZQEcu2tf",
+    "fileId": "43d1fFumVMvbraox5Pt8Cg",
     "sync": false
   },
   {
@@ -1332,18 +1393,18 @@
     "_name": "share_coin_richtext",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 37
+      "__id__": 38
     },
     "_children": [],
     "_tag": -1,
     "_active": true,
     "_components": [
       {
-        "__id__": 42
+        "__id__": 43
       }
     ],
     "_prefab": {
-      "__id__": 43
+      "__id__": 44
     },
     "_id": "",
     "_opacity": 255,
@@ -1386,7 +1447,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 41
+      "__id__": 42
     },
     "_enabled": true,
     "_N$string": "<img src='alert_coin'/><color=#ffffff> 0B</c>",
@@ -1408,7 +1469,7 @@
     "asset": {
       "__uuid__": "3adcd9ac-e84f-4100-96c8-71a1d1687441"
     },
-    "fileId": "61Wq+VDjBB/7W5omnpjZzl",
+    "fileId": "29OGt0FwhL44jtvJVa0cWa",
     "sync": false
   },
   {
@@ -1416,7 +1477,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 37
+      "__id__": 38
     },
     "_enabled": true,
     "_spriteFrame": {
@@ -1442,7 +1503,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 37
+      "__id__": 38
     },
     "_enabled": true,
     "transition": 1,
@@ -1464,7 +1525,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 46
+        "__id__": 47
       }
     ],
     "_N$interactable": true,
@@ -1502,7 +1563,7 @@
       "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
     },
     "_N$target": {
-      "__id__": 37
+      "__id__": 38
     }
   },
   {
@@ -1522,7 +1583,299 @@
     "asset": {
       "__uuid__": "3adcd9ac-e84f-4100-96c8-71a1d1687441"
     },
-    "fileId": "afjSVvZbBKaYl97j87nNQh",
+    "fileId": "89BRkrXI1GZqk8NNOWdrqc",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "normal_btn",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 26
+    },
+    "_children": [
+      {
+        "__id__": 50
+      }
+    ],
+    "_tag": -1,
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 53
+      },
+      {
+        "__id__": 54
+      }
+    ],
+    "_prefab": {
+      "__id__": 56
+    },
+    "_id": "",
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_cascadeOpacityEnabled": true,
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 248,
+      "height": 120
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_scaleX": 1,
+    "_scaleY": 1,
+    "_position": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_localZOrder": 0,
+    "_globalZOrder": 0,
+    "_opacityModifyRGB": false,
+    "groupIndex": 0
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 49
+    },
+    "_children": [],
+    "_tag": -1,
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 51
+      }
+    ],
+    "_prefab": {
+      "__id__": 52
+    },
+    "_id": "",
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_cascadeOpacityEnabled": true,
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 136,
+      "height": 40
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_scaleX": 1,
+    "_scaleY": 1,
+    "_position": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_localZOrder": 0,
+    "_globalZOrder": 0,
+    "_opacityModifyRGB": false,
+    "groupIndex": 0
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 50
+    },
+    "_enabled": true,
+    "_useOriginalSize": false,
+    "_actualFontSize": 34,
+    "_fontSize": 34,
+    "_lineHeight": 40,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_N$string": "我知道了",
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3adcd9ac-e84f-4100-96c8-71a1d1687441"
+    },
+    "fileId": "6f2DCM6NVL5IQxwdrNdQIa",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 49
+    },
+    "_enabled": true,
+    "_spriteFrame": {
+      "__uuid__": "f6df88da-8726-4fb0-ac03-9ef58d7ae5c9"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_atlas": null
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 49
+    },
+    "_enabled": true,
+    "transition": 1,
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 120,
+      "g": 120,
+      "b": 120,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 55
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": {
+      "__id__": 49
+    }
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "OfflineGrossIncome",
+    "handler": "close",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3adcd9ac-e84f-4100-96c8-71a1d1687441"
+    },
+    "fileId": "20A9ztz45LFI5T9BoRb4HJ",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Layout",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 26
+    },
+    "_enabled": true,
+    "_layoutSize": {
+      "__type__": "cc.Size",
+      "width": -8,
+      "height": 200
+    },
+    "_resize": 1,
+    "_N$layoutType": 1,
+    "_N$padding": 0,
+    "_N$cellSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 40
+    },
+    "_N$startAxis": 0,
+    "_N$paddingLeft": 0,
+    "_N$paddingRight": 0,
+    "_N$paddingTop": 0,
+    "_N$paddingBottom": 0,
+    "_N$spacingX": 8,
+    "_N$spacingY": 0,
+    "_N$verticalDirection": 1,
+    "_N$horizontalDirection": 0
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "3adcd9ac-e84f-4100-96c8-71a1d1687441"
+    },
+    "fileId": "53dF1LWQBDaab0bO3pTGgy",
     "sync": false
   },
   {
@@ -1574,11 +1927,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 51
+        "__id__": 62
       }
     ],
     "_prefab": {
-      "__id__": 52
+      "__id__": 63
     },
     "_id": "",
     "_opacity": 255,
@@ -1621,7 +1974,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 50
+      "__id__": 61
     },
     "_enabled": true,
     "_spriteFrame": {
@@ -1668,13 +2021,22 @@
       "__id__": 24
     },
     "watchVideoRichText": {
-      "__id__": 31
+      "__id__": 32
     },
     "shareRichText": {
-      "__id__": 42
+      "__id__": 43
     },
     "secretarySprite": {
-      "__id__": 50
+      "__id__": 61
+    },
+    "videoBtn": {
+      "__id__": 27
+    },
+    "shareBtn": {
+      "__id__": 38
+    },
+    "normalBtn": {
+      "__id__": 49
     },
     "_grossIncome": 0
   },

+ 7 - 7
assets/resources/prefabs/rank_page.prefab

@@ -882,7 +882,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 182,
+      "width": 180,
       "height": 40
     },
     "_rotationX": 0,
@@ -1152,7 +1152,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 182,
+      "width": 180,
       "height": 40
     },
     "_rotationX": 0,
@@ -2100,7 +2100,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 94,
+      "width": 90,
       "height": 40
     },
     "_rotationX": 0,
@@ -2478,7 +2478,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 44,
+      "width": 40,
       "height": 30
     },
     "_rotationX": 0,
@@ -3396,7 +3396,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 94,
+      "width": 90,
       "height": 40
     },
     "_rotationX": 0,
@@ -3859,7 +3859,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 48,
+      "width": 44,
       "height": 30
     },
     "_rotationX": 0,
@@ -3966,7 +3966,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 17,
+      "width": 13,
       "height": 40
     },
     "_rotationX": 0,

+ 3 - 3
assets/scripts/Game.js

@@ -404,7 +404,7 @@ cc.Class({
         let actionTop = cc.moveBy(0.4, cc.v2(0, -this.myInfoTop.height));
         this.myInfoTop.runAction(actionTop);
 
-        if(this.talentIcon.enable) {
+        if (this.talentIcon.enable) {
             this.talentIcon.active = true;
         }
 
@@ -575,7 +575,7 @@ cc.Class({
     },
 
     showCompanyMax() {
-        ///由于阿德的上报等级不够及时,所以满级等5秒再显示去下个城市的按钮
+
         this.scheduleOnce(() => {
             if (Global.devCityId === 1) {
                 this.showCatFlyAnimation();
@@ -583,7 +583,7 @@ cc.Class({
             } else {
                 this.showCompanyMaxAlert();
             }
-        }, 5);
+        }, 1);
     },
 
     showCompanyMaxAlert() {

+ 2 - 2
assets/scripts/UserInfo.js

@@ -119,11 +119,11 @@ cc.Class({
         // 监听满级事件
         GameEvent.on(NotiKey.LevelHomeItemBuildingFull, this, () => {
             this.levelHomeItemFullCount += 1;
-            if (this.levelHomeItemFullCount === 5 && Global.devCityId <cityList.length) {
+            if (this.levelHomeItemFullCount === 5 && Global.devCityId < cityList.length) {
                 GameEvent.fire(NotiKey.LevelHomeItemBuildingAllFull);
                 GameEvent.fire(NotiKey.CurrentCompanyMax);
                 // 满级立刻上报
-                this.reportFunc();
+                this.doReport();
             }
         });
 

+ 8 - 0
assets/scripts/artistTrain/ArtistTrainItem.js

@@ -87,7 +87,15 @@ cc.Class({
         this.contentLabel.string = data.msg;
         
         this.recuperateLabel.string = data.ticket;
+        if(data.ticket > GameModule.userInfo.ticket) {
+            this.recuperateLabel.node.color = new cc.Color(255, 0, 0);
+        }
+
         this.costLabel.string = DWTool.coinParse(data.coin);
+        if(data.coin > GameModule.userInfo.grossIncome) {
+            this.costLabel.node.color = new cc.Color(255, 0, 0);
+        }
+
         this.sandclockLabel.string = DWTool.calculateTime(data.cd / 1000);
 
         let trainEnable = GameModule.userInfo.grossIncome > data.coin && GameModule.userInfo.ticket > data.ticket

+ 6 - 5
assets/scripts/friendlist/ListViewAdapter.js

@@ -11,7 +11,6 @@ class ListViewAdapter {
         this.lastContentPosY = 0; // use this variable to detect if we are scrolling up or down
         this.spawnCount = 16;
         this.itemHeight = 0;
-        this.bufferZone = 500;
         this.spacing = 10;
         this.scriptName = '';
 
@@ -19,18 +18,20 @@ class ListViewAdapter {
     }
 
     initialize(itemTemplate) {
-        // this.bufferZone = this.scrollView.node.height / 2;
+
         let actualCount = this.dataList.length < this.spawnCount ? this.dataList.length : this.spawnCount;
         // let actualCount = this.dataList.length;
-        this.scriptItems = [];
         if (this.itemHeight > 0) {
+            this.bufferZone = this.scrollView.node.height / 2 + this.content.height / 2;
             this.content.height = (this.itemHeight + this.spacing) * this.dataList.length;
         }
+        this.scriptItems = [];
         this.content.removeAllChildren();
         for (let i = 0; i < actualCount; ++i) { // spawn items, we only need to do this once
             let item = cc.instantiate(itemTemplate);
             if (this.itemHeight === 0) {
                 this.itemHeight = item.height; // get total content height
+                this.bufferZone = this.scrollView.node.height / 2 + this.content.height / 2;
                 this.content.height = (this.itemHeight + this.spacing) * this.dataList.length;
             }
             this.content.addChild(item);
@@ -64,7 +65,7 @@ class ListViewAdapter {
             if (isDown) {
                 // if away from buffer zone and not reaching top of content
                 if (viewPos.y < -buffer && this.scriptItems[i].node.y + offset < 0) {
-                    this.scriptItems[i].node.setPositionY(this.scriptItems[i].node.y + offset);
+                    this.scriptItems[i].node.y = this.scriptItems[i].node.y + offset;
                     let itemScript = this.scriptItems[i];
                     let itemId = itemScript._itemId - this.scriptItems.length;
                     itemScript.updateItem(this.dataList[itemId], itemId);
@@ -72,7 +73,7 @@ class ListViewAdapter {
             } else {
                 // if away from buffer zone and not reaching bottom of content
                 if (viewPos.y > buffer && this.scriptItems[i].node.y - offset > -this.content.height) {
-                    this.scriptItems[i].node.setPositionY(this.scriptItems[i].node.y - offset);
+                    this.scriptItems[i].node.y = this.scriptItems[i].node.y - offset;
 
                     let itemScript = this.scriptItems[i];
                     let itemId = itemScript._itemId + this.scriptItems.length;

+ 15 - 4
assets/scripts/levelHome/LevelHome.js

@@ -152,7 +152,10 @@ cc.Class({
 
         GameEvent.on(GameNotificationKey.ResetLevelHomePaddingBottom, this, () => {
             this.resetPaddingBottom();
+
         });
+         //房间解锁通知,用来触发是否显示入驻艺人通知(因为通知需要随机出现在没有艺人的房间,所以需要在LevelHome这一层来处理)
+        GameEvent.on(GameNotificationKey.LevelHomeItemUnlock, this, this.randomResidentTip);
 
         GameEvent.on(GameNotificationKey.ReceiveLevelHomeItemPropUpdate, this, (props) => {
             for (const key in props) {
@@ -363,10 +366,16 @@ cc.Class({
             for (let i = 0; i < this.buildings.length; i++) {
                 let itemScript = this.buildings[i];
                 let buildingInfo = this.buildingInfos[i];
-                if (buildingInfo.artists == undefined || buildingInfo.artists.length === 0) {
-                    noArtistBuildings.push(itemScript);
-                } else {
+
+                if (buildingInfo.level == 0) {
                     itemScript.setResidentTip(false);
+                    continue;
+                }
+
+                if (buildingInfo.artists && buildingInfo.artists.length > 0) {
+                    itemScript.setResidentTip(false);
+                } else {
+                    noArtistBuildings.push(itemScript);
                 }
             }
             if (noArtistBuildings.length > 0) {
@@ -377,7 +386,7 @@ cc.Class({
 
                 clearInterval(this.residentTipHideTimer);
                 clearInterval(this.residentTipShowTimer);
-                
+
                 this.residentTipHideTimer = setInterval(() => {
                     noArtistBuildings[index].setResidentTip(false);
                 }, 5000);
@@ -395,9 +404,11 @@ cc.Class({
             clearInterval(this.residentTipShowTimer);
         }
         GameEvent.off(GameNotificationKey.showCatFlyAnimation, this);
+
         GameEvent.off(GameNotificationKey.ReloadLevelHomeData, this);
         GameEvent.off(GameNotificationKey.ResetLevelHomePaddingBottom, this);
         GameEvent.off(GameNotificationKey.ReceiveLevelHomeItemPropUpdate, this);
+        GameEvent.off(GameNotificationKey.LevelHomeItemUnlock, this);
     },
 
 });

+ 12 - 5
assets/scripts/levelHome/LevelHomeItem.js

@@ -768,17 +768,24 @@ cc.Class({
         if (buildModel.hasNext != 1) {
             GameEvent.fire(GameNotificationKey.LevelHomeItemBuildingFull);
         }
+
+        if (buildModel.level === 1) {
+            GameEvent.fire(GameNotificationKey.LevelHomeItemUnlock);
+        }
     },
 
     /**
-     * 升级到某个特定等级,显示房间加速
+     * 升级到某个特定等级,根据配置表的金币生产速度和时间,判断是否需要弹出金币x2或者时间-50%的通知。
      */
     isLevelSpeedUp(buildingInfo) {
-        // if (buildingInfo.speedup) {//正式代码,等js数据修改同步完解除封印
-        //     GameEvent.fire(GameNotificationKey.LevelHomeSpeedUp, buildingInfo.name, buildingInfo.speedup);
-        // }
-        if (buildingInfo.level % 25 === 0) {///测试代码,暂时这么写着
+        if (buildingInfo.level <= 2) {
+            return;
+        }
+
+        if (buildingInfo.rate >= this.buildingInfo.rate * 2) {
             GameEvent.fire(GameNotificationKey.LevelHomeSpeedUp, buildingInfo.name, 1);
+        } else if (buildingInfo.rateUnit === this.buildingInfo.rateUnit / 2) {
+            GameEvent.fire(GameNotificationKey.LevelHomeSpeedUp, buildingInfo.name, 2);
         }
     },
 

+ 49 - 0
assets/scripts/levelHome/OfflineGrossIncome.js

@@ -3,6 +3,8 @@ const DWTool = require('../utils/DWTool')
 const { GameNotificationKey } = require("../utils/GameEnum");
 const GameModule = require('../utils/GameModule')
 const WeChat = require('../net/WeChat');
+const Api = require('../net/Api');
+
 cc.Class({
     extends: cc.Component,
 
@@ -17,6 +19,23 @@ cc.Class({
         shareRichText: cc.RichText,
 
         secretarySprite: cc.Node,
+
+        videoBtn: {
+            tooltip: '观看视频按钮',
+            default: null,
+            type: cc.Node
+        },
+        shareBtn: {
+            tooltip: '分享按钮',
+            default: null,
+            type: cc.Node
+        },
+        normalBtn: {
+            tooltip: '普通确认按钮',
+            default: null,
+            type: cc.Node
+        },
+
         _grossIncome: 0,
         grossIncome: {
             get() {
@@ -36,6 +55,27 @@ cc.Class({
 
     init(grossIncome) {
         this.grossIncome = grossIncome;
+        
+        this._resetBtn();
+        if(CC_WECHATGAME) {
+            wx.request({
+                url: "https://pub.dwstatic.com/wxgame/allstar/sheet/offlineIncome.json",
+                success: (res) => {
+                    if(res.data.video) {
+                        this.videoBtn.active = true;
+                    }
+                    if(res.data.share) {
+                        this.shareBtn.active = true;
+                    }
+                    if(res.data.normal) {
+                        this.normalBtn.active = true;
+                    }
+                }
+            })
+        } else {
+            this.videoBtn.active = true;
+            this.shareBtn.active = true;
+        }
     },
 
     onLoad () {
@@ -51,6 +91,15 @@ cc.Class({
         this.secretarySprite.runAction(cc.moveBy(0.3, cc.v2(400, 0)));
     },
 
+    /**
+     * 重置按钮状态
+     */
+    _resetBtn () {
+        this.videoBtn.active = false;
+        this.shareBtn.active = false;
+        this.normalBtn.active = false;
+    },
+
     dismiss() {
         let finish = cc.callFunc(() => {
             this.node.destroy();

+ 3 - 1
assets/scripts/rank/RankListWithAdapter.js

@@ -52,6 +52,8 @@ cc.Class({
     },
 
     onScrollEvent() {
-        this.listAdapter.update();
+        if (this.listAdapter) {
+            this.listAdapter.update();
+        }
     },
 });

+ 21 - 7
assets/scripts/userInformation/UserInteraction.js

@@ -1,5 +1,5 @@
 const interactInfo = require('../data/interactInfo');
-var { UserInteractionType } = require('../utils/GameEnum');
+var { UserInteractionType, UserIntimacyType } = require('../utils/GameEnum');
 var UserInformationApi = require('../net/UserInformationApi');
 const DWTool = require('../utils/DWTool');
 const GameModule = require('../utils/GameModule');
@@ -256,9 +256,9 @@ cc.Class({
 
     selectInteraction() {
         UserInformationApi.postInteract(this.uid, this.interactionType, (responseData) => {
+            this.interactionInfo = responseData;
             this.interactionResponse(responseData);
             this.userInformation.configIntimacy(responseData);
-            this.interactionInfo = responseData;
         }, (error) => {
             console.log('互动失败' + error);
         });
@@ -273,17 +273,31 @@ cc.Class({
                 this.showNodeAnimation(this.playUpSuccessNode);
                 break;
             case UserInteractionType.PlayUp:
-                this.playUpSuccessNode.active = true;
-                this.showNodeAnimation(this.playUpSuccessNode);
+                if (responseData.heart == UserIntimacyType.Full) {
+                    this.intimacyNode.active = true;
+                    this.showNodeAnimation(this.intimacyNode);
+                    this.intimacyMng = this.intimacyNode.getComponent('UserIntimacyInfo');
+                    this.intimacyMng.configIntimacyInfo(this.interactionInfo, true, false);
+                } else {
+                    this.playUpSuccessNode.active = true;
+                    this.showNodeAnimation(this.playUpSuccessNode);
+                }
                 break;
             case UserInteractionType.Revolt:
                 this.revoltSuccessNode.active = true;
                 this.showNodeAnimation(this.revoltSuccessNode);
                 break;
             case UserInteractionType.Pacify:
-                this.playUpSuccessNode.active = true;
-                this.showNodeAnimation(this.playUpSuccessNode);
-                GameModule.homeGuide.getComponent('HomeGuide').handleGuideStateNext('state26', 'state27');
+                if (responseData.heart == UserIntimacyType.Full) {
+                    this.intimacyNode.active = true;
+                    this.showNodeAnimation(this.intimacyNode);
+                    this.intimacyMng = this.intimacyNode.getComponent('UserIntimacyInfo');
+                    this.intimacyMng.configIntimacyInfo(this.interactionInfo, true, false);
+                } else {
+                    this.playUpSuccessNode.active = true;
+                    this.showNodeAnimation(this.playUpSuccessNode);
+                    GameModule.homeGuide.getComponent('HomeGuide').handleGuideStateNext('state26', 'state27');
+                }
                 break;
             case UserInteractionType.Order:
                 this.revoltSuccessNode.active = true;

+ 14 - 14
assets/scripts/utils/BuildingManager.js

@@ -3,7 +3,7 @@ var BuildingModel = require('./BuildingModel');
 const bInfo = require('../data/buildingInfo');
 const bLevel = require('../data/buildingLevel');
 export default class BuildingManager {
-    
+
     static _instance;
 
     _allBuildData = {};
@@ -16,8 +16,8 @@ export default class BuildingManager {
 
     static get instance() {
         if (!BuildingManager._instance) {
-            BuildingManager._instance = new BuildingManager(); 
-            
+            BuildingManager._instance = new BuildingManager();
+
         }
         return BuildingManager._instance;
     };
@@ -41,15 +41,15 @@ export default class BuildingManager {
         for (let i in bLevel) {
             let curLevel = bLevel[i]
             curLevel.forEach((item, index) => {
-                
-                for(var j in item) {
+
+                for (var j in item) {
                     item[j] = parseInt(item[j])
                 }
-                
+
                 let nextObj = {
-                    nextRate:0,
-                    nextRateUnit:0,
-                    nextUpScore:0,
+                    nextRate: 0,
+                    nextRateUnit: 0,
+                    nextUpScore: 0,
                     hasNext: 0
                 };
                 let staticObj = {
@@ -58,20 +58,20 @@ export default class BuildingManager {
                     name: bInfoMap[item.buildingId].name,
                     jobId: bInfoMap[item.buildingId].jobId,
                 };
-                if(curLevel[index + 1] && curLevel[index + 1].buildingId == item.buildingId) {
+                if (curLevel[index + 1] && curLevel[index + 1].buildingId == item.buildingId) {
                     nextObj = {
                         nextRate: parseInt(curLevel[index + 1].rate),
                         nextRateUnit: parseInt(curLevel[index + 1].rateUnit),
                         nextUpScore: parseInt(curLevel[index + 1].upScore),
-                        hasNext: 1, 
+                        hasNext: 1,
                     }
                     staticObj['unlockScore'] = 0
                 }
                 item = Object.assign(item, staticObj, nextObj)
             })
         }
-        
-        for(let i in bLevel) {
+
+        for (let i in bLevel) {
             let tarObj = Object.assign({}, bLevel[i][0]);
             tarObj['unlockScore'] = bInfoMap[tarObj.buildingId].unlockScore;
             tarObj['level'] = 0;
@@ -103,7 +103,7 @@ export default class BuildingManager {
      */
     getLevelCount(buildingId) {
         let building = this._allBuildData[buildingId];
-        return building.length-1;
+        return building.length - 1;
     };
 
 }

+ 4 - 0
assets/scripts/utils/GameEnum.js

@@ -208,10 +208,14 @@ const GameNotificationKey = cc.Enum({
     // 离线收益动画
     HandleOfflineIncomeAnim: 'HandleOfflineIncomeAnim',
 
+    // 建筑升级到特定等级,触发金币翻倍或者生产时间缩短的通知(仅通知,金币生产速度已经在配置表有体现)
     LevelHomeSpeedUp: 'LevelHomeSpeedUp',
 
     // 接受到levelhomeitem里的道具更新
     ReceiveLevelHomeItemPropUpdate: 'ReceiveLevelHomeItemPropUpdate',
+
+    LevelHomeItemUnlock: 'LevelHomeItemUnlock',
+
 });
 
 var LevelHomeFriendItemStyle = cc.Enum({

+ 14 - 0
protobuf/message.proto

@@ -13,6 +13,7 @@ message Message {
         NOTIFY = 2;
         ROLEOPT = 3;
         REPORT = 4;
+        BD_ITEM = 5;
     }
 
     Type type = 1;
@@ -105,4 +106,17 @@ message Message {
 
     string msg = 6;
 
+    message BuildingItems {
+        map<string, Item> buildingItem = 1;
+    }
+
+    BuildingItems buildingItems = 7;
+
+    message Item {
+
+        int64 id = 1;
+
+        int32 count = 2;
+    }
+
 }

BIN
tools/excel/allstar_buildingLevel.xlsx


BIN
tools/excel/allstar_city.xlsx


BIN
tools/excel/allstar_cityIncome.xlsx


BIN
tools/excel/allstar_dailyTask.xlsx


BIN
tools/excel/allstar_jobLevel.xlsx


BIN
tools/original_excel/allstar_buildingLevel.xls