Просмотр исходного кода

【修改】 修改战斗界面

Hua лет назад: 2
Родитель
Сommit
ad9a8d7013

+ 33 - 47
assets/resources/edt_prefab/Battle/BattleMain.prefab

@@ -121,7 +121,7 @@
121
     "_contentSize": {
121
     "_contentSize": {
122
       "__type__": "cc.Size",
122
       "__type__": "cc.Size",
123
       "width": 810,
123
       "width": 810,
124
-      "height": 1440
124
+      "height": 1205
125
     },
125
     },
126
     "_anchorPoint": {
126
     "_anchorPoint": {
127
       "__type__": "cc.Vec2",
127
       "__type__": "cc.Vec2",
@@ -133,7 +133,7 @@
133
       "ctor": "Float64Array",
133
       "ctor": "Float64Array",
134
       "array": [
134
       "array": [
135
         0,
135
         0,
136
-        0,
136
+        22.5,
137
         0,
137
         0,
138
         0,
138
         0,
139
         0,
139
         0,
@@ -192,7 +192,7 @@
192
     "_contentSize": {
192
     "_contentSize": {
193
       "__type__": "cc.Size",
193
       "__type__": "cc.Size",
194
       "width": 810,
194
       "width": 810,
195
-      "height": 1440
195
+      "height": 1205
196
     },
196
     },
197
     "_anchorPoint": {
197
     "_anchorPoint": {
198
       "__type__": "cc.Vec2",
198
       "__type__": "cc.Vec2",
@@ -266,7 +266,7 @@
266
     "_contentSize": {
266
     "_contentSize": {
267
       "__type__": "cc.Size",
267
       "__type__": "cc.Size",
268
       "width": 810,
268
       "width": 810,
269
-      "height": 1170.184
269
+      "height": 1030.184
270
     },
270
     },
271
     "_anchorPoint": {
271
     "_anchorPoint": {
272
       "__type__": "cc.Vec2",
272
       "__type__": "cc.Vec2",
@@ -278,7 +278,7 @@
278
       "ctor": "Float64Array",
278
       "ctor": "Float64Array",
279
       "array": [
279
       "array": [
280
         0,
280
         0,
281
-        720,
281
+        602.5,
282
         0,
282
         0,
283
         0,
283
         0,
284
         0,
284
         0,
@@ -370,7 +370,7 @@
370
       "ctor": "Float64Array",
370
       "ctor": "Float64Array",
371
       "array": [
371
       "array": [
372
         0,
372
         0,
373
-        -70,
373
+        0,
374
         0,
374
         0,
375
         0,
375
         0,
376
         0,
376
         0,
@@ -914,21 +914,11 @@
914
     "_N$normalSprite": {
914
     "_N$normalSprite": {
915
       "__uuid__": "3678ce1d-9501-424a-b857-63b969499ab7"
915
       "__uuid__": "3678ce1d-9501-424a-b857-63b969499ab7"
916
     },
916
     },
917
-    "_N$pressedSprite": {
918
-      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
919
-    },
920
-    "pressedSprite": {
921
-      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
922
-    },
923
-    "_N$hoverSprite": {
924
-      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
925
-    },
926
-    "hoverSprite": {
927
-      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
928
-    },
929
-    "_N$disabledSprite": {
930
-      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
931
-    },
917
+    "_N$pressedSprite": null,
918
+    "pressedSprite": null,
919
+    "_N$hoverSprite": null,
920
+    "hoverSprite": null,
921
+    "_N$disabledSprite": null,
932
     "_N$target": {
922
     "_N$target": {
933
       "__id__": 14
923
       "__id__": 14
934
     },
924
     },
@@ -3487,21 +3477,11 @@
3487
     "_N$normalSprite": {
3477
     "_N$normalSprite": {
3488
       "__uuid__": "1adb3c92-3ac6-4819-87cb-7078e5833ac2"
3478
       "__uuid__": "1adb3c92-3ac6-4819-87cb-7078e5833ac2"
3489
     },
3479
     },
3490
-    "_N$pressedSprite": {
3491
-      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
3492
-    },
3493
-    "pressedSprite": {
3494
-      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
3495
-    },
3496
-    "_N$hoverSprite": {
3497
-      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
3498
-    },
3499
-    "hoverSprite": {
3500
-      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
3501
-    },
3502
-    "_N$disabledSprite": {
3503
-      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
3504
-    },
3480
+    "_N$pressedSprite": null,
3481
+    "pressedSprite": null,
3482
+    "_N$hoverSprite": null,
3483
+    "hoverSprite": null,
3484
+    "_N$disabledSprite": null,
3505
     "_N$target": {
3485
     "_N$target": {
3506
       "__id__": 85
3486
       "__id__": 85
3507
     },
3487
     },
@@ -6655,7 +6635,7 @@
6655
     "_alignFlags": 41,
6635
     "_alignFlags": 41,
6656
     "_left": 0,
6636
     "_left": 0,
6657
     "_right": 0,
6637
     "_right": 0,
6658
-    "_top": 70,
6638
+    "_top": 0,
6659
     "_bottom": 0,
6639
     "_bottom": 0,
6660
     "_verticalCenter": 0,
6640
     "_verticalCenter": 0,
6661
     "_horizontalCenter": 0,
6641
     "_horizontalCenter": 0,
@@ -6715,7 +6695,7 @@
6715
     "_contentSize": {
6695
     "_contentSize": {
6716
       "__type__": "cc.Size",
6696
       "__type__": "cc.Size",
6717
       "width": 810,
6697
       "width": 810,
6718
-      "height": 395.18399999999997
6698
+      "height": 325.18399999999997
6719
     },
6699
     },
6720
     "_anchorPoint": {
6700
     "_anchorPoint": {
6721
       "__type__": "cc.Vec2",
6701
       "__type__": "cc.Vec2",
@@ -6727,7 +6707,7 @@
6727
       "ctor": "Float64Array",
6707
       "ctor": "Float64Array",
6728
       "array": [
6708
       "array": [
6729
         0,
6709
         0,
6730
-        -1170.184,
6710
+        -1030.184,
6731
         0,
6711
         0,
6732
         0,
6712
         0,
6733
         0,
6713
         0,
@@ -6791,7 +6771,7 @@
6791
       "ctor": "Float64Array",
6771
       "ctor": "Float64Array",
6792
       "array": [
6772
       "array": [
6793
         0,
6773
         0,
6794
-        291.12512,
6774
+        221.12511999999998,
6795
         0,
6775
         0,
6796
         0,
6776
         0,
6797
         0,
6777
         0,
@@ -6897,7 +6877,7 @@
6897
     "_layoutSize": {
6877
     "_layoutSize": {
6898
       "__type__": "cc.Size",
6878
       "__type__": "cc.Size",
6899
       "width": 810,
6879
       "width": 810,
6900
-      "height": 395.18399999999997
6880
+      "height": 325.18399999999997
6901
     },
6881
     },
6902
     "_resize": 1,
6882
     "_resize": 1,
6903
     "_N$layoutType": 2,
6883
     "_N$layoutType": 2,
@@ -6911,7 +6891,7 @@
6911
     "_N$paddingLeft": 0,
6891
     "_N$paddingLeft": 0,
6912
     "_N$paddingRight": 0,
6892
     "_N$paddingRight": 0,
6913
     "_N$paddingTop": 0,
6893
     "_N$paddingTop": 0,
6914
-    "_N$paddingBottom": 70,
6894
+    "_N$paddingBottom": 0,
6915
     "_N$spacingX": 0,
6895
     "_N$spacingX": 0,
6916
     "_N$spacingY": 0,
6896
     "_N$spacingY": 0,
6917
     "_N$verticalDirection": 1,
6897
     "_N$verticalDirection": 1,
@@ -6968,7 +6948,7 @@
6968
     "_layoutSize": {
6948
     "_layoutSize": {
6969
       "__type__": "cc.Size",
6949
       "__type__": "cc.Size",
6970
       "width": 810,
6950
       "width": 810,
6971
-      "height": 1170.184
6951
+      "height": 1030.184
6972
     },
6952
     },
6973
     "_resize": 1,
6953
     "_resize": 1,
6974
     "_N$layoutType": 2,
6954
     "_N$layoutType": 2,
@@ -6981,7 +6961,7 @@
6981
     "_N$startAxis": 0,
6961
     "_N$startAxis": 0,
6982
     "_N$paddingLeft": 0,
6962
     "_N$paddingLeft": 0,
6983
     "_N$paddingRight": 0,
6963
     "_N$paddingRight": 0,
6984
-    "_N$paddingTop": 70,
6964
+    "_N$paddingTop": 0,
6985
     "_N$paddingBottom": 0,
6965
     "_N$paddingBottom": 0,
6986
     "_N$spacingX": 0,
6966
     "_N$spacingX": 0,
6987
     "_N$spacingY": 0,
6967
     "_N$spacingY": 0,
@@ -7098,8 +7078,8 @@
7098
     "_alignFlags": 45,
7078
     "_alignFlags": 45,
7099
     "_left": 0,
7079
     "_left": 0,
7100
     "_right": 0,
7080
     "_right": 0,
7101
-    "_top": 0,
7102
-    "_bottom": 0,
7081
+    "_top": 95,
7082
+    "_bottom": 140,
7103
     "_verticalCenter": 0,
7083
     "_verticalCenter": 0,
7104
     "_horizontalCenter": 0,
7084
     "_horizontalCenter": 0,
7105
     "_isAbsLeft": true,
7085
     "_isAbsLeft": true,
@@ -7268,7 +7248,13 @@
7268
       "__id__": 194
7248
       "__id__": 194
7269
     },
7249
     },
7270
     "roomContent": {
7250
     "roomContent": {
7271
-      "__id__": 179
7251
+      "__id__": 180
7252
+    },
7253
+    "bottomLayout": {
7254
+      "__id__": 183
7255
+    },
7256
+    "layerLayout": {
7257
+      "__id__": 186
7272
     },
7258
     },
7273
     "roomPreviewPrefab": {
7259
     "roomPreviewPrefab": {
7274
       "__uuid__": "bc806de8-a0c0-4ebb-99eb-6dbfc2fc7ef7"
7260
       "__uuid__": "bc806de8-a0c0-4ebb-99eb-6dbfc2fc7ef7"

+ 159 - 100
assets/resources/edt_prefab/Battle/BattleRoomPreviweCell.prefab

@@ -39,23 +39,23 @@
39
         "__id__": 87
39
         "__id__": 87
40
       },
40
       },
41
       {
41
       {
42
-        "__id__": 99
42
+        "__id__": 100
43
       },
43
       },
44
       {
44
       {
45
-        "__id__": 108
45
+        "__id__": 110
46
       },
46
       },
47
       {
47
       {
48
-        "__id__": 117
48
+        "__id__": 119
49
       }
49
       }
50
     ],
50
     ],
51
     "_active": true,
51
     "_active": true,
52
     "_components": [
52
     "_components": [
53
       {
53
       {
54
-        "__id__": 127
54
+        "__id__": 131
55
       }
55
       }
56
     ],
56
     ],
57
     "_prefab": {
57
     "_prefab": {
58
-      "__id__": 128
58
+      "__id__": 132
59
     },
59
     },
60
     "_opacity": 255,
60
     "_opacity": 255,
61
     "_color": {
61
     "_color": {
@@ -776,7 +776,7 @@
776
   },
776
   },
777
   {
777
   {
778
     "__type__": "cc.Node",
778
     "__type__": "cc.Node",
779
-    "_name": "BattleRoomPlayerIcon1",
779
+    "_name": "BattleRoomPlayerIcon3",
780
     "_objFlags": 0,
780
     "_objFlags": 0,
781
     "_parent": {
781
     "_parent": {
782
       "__id__": 18
782
       "__id__": 18
@@ -2420,7 +2420,7 @@
2420
   },
2420
   },
2421
   {
2421
   {
2422
     "__type__": "cc.Node",
2422
     "__type__": "cc.Node",
2423
-    "_name": "BattleRoomPlayerIcon3",
2423
+    "_name": "BattleRoomPlayerIcon1",
2424
     "_objFlags": 0,
2424
     "_objFlags": 0,
2425
     "_parent": {
2425
     "_parent": {
2426
       "__id__": 41
2426
       "__id__": 41
@@ -3275,7 +3275,7 @@
3275
       }
3275
       }
3276
     ],
3276
     ],
3277
     "_prefab": {
3277
     "_prefab": {
3278
-      "__id__": 98
3278
+      "__id__": 99
3279
     },
3279
     },
3280
     "_opacity": 255,
3280
     "_opacity": 255,
3281
     "_color": {
3281
     "_color": {
@@ -3666,7 +3666,11 @@
3666
     "_grayMaterial": null,
3666
     "_grayMaterial": null,
3667
     "duration": 0.1,
3667
     "duration": 0.1,
3668
     "zoomScale": 1.2,
3668
     "zoomScale": 1.2,
3669
-    "clickEvents": [],
3669
+    "clickEvents": [
3670
+      {
3671
+        "__id__": 98
3672
+      }
3673
+    ],
3670
     "_N$interactable": true,
3674
     "_N$interactable": true,
3671
     "_N$enableAutoGrayEffect": false,
3675
     "_N$enableAutoGrayEffect": false,
3672
     "_N$transition": 2,
3676
     "_N$transition": 2,
@@ -3716,27 +3720,25 @@
3716
     "_N$normalSprite": {
3720
     "_N$normalSprite": {
3717
       "__uuid__": "aa0553ee-603a-47ae-80d6-6d9859db4dd4"
3721
       "__uuid__": "aa0553ee-603a-47ae-80d6-6d9859db4dd4"
3718
     },
3722
     },
3719
-    "_N$pressedSprite": {
3720
-      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
3721
-    },
3722
-    "pressedSprite": {
3723
-      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
3724
-    },
3725
-    "_N$hoverSprite": {
3726
-      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
3727
-    },
3728
-    "hoverSprite": {
3729
-      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
3730
-    },
3731
-    "_N$disabledSprite": {
3732
-      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
3733
-    },
3723
+    "_N$pressedSprite": null,
3724
+    "pressedSprite": null,
3725
+    "_N$hoverSprite": null,
3726
+    "hoverSprite": null,
3727
+    "_N$disabledSprite": null,
3734
     "_N$target": {
3728
     "_N$target": {
3735
       "__id__": 88
3729
       "__id__": 88
3736
     },
3730
     },
3737
     "_id": ""
3731
     "_id": ""
3738
   },
3732
   },
3739
   {
3733
   {
3734
+    "__type__": "cc.ClickEvent",
3735
+    "target": null,
3736
+    "component": "",
3737
+    "_componentId": "",
3738
+    "handler": "",
3739
+    "customEventData": ""
3740
+  },
3741
+  {
3740
     "__type__": "cc.PrefabInfo",
3742
     "__type__": "cc.PrefabInfo",
3741
     "root": {
3743
     "root": {
3742
       "__id__": 1
3744
       "__id__": 1
@@ -3756,17 +3758,17 @@
3756
     },
3758
     },
3757
     "_children": [
3759
     "_children": [
3758
       {
3760
       {
3759
-        "__id__": 100
3761
+        "__id__": 101
3760
       }
3762
       }
3761
     ],
3763
     ],
3762
     "_active": true,
3764
     "_active": true,
3763
     "_components": [
3765
     "_components": [
3764
       {
3766
       {
3765
-        "__id__": 106
3767
+        "__id__": 107
3766
       }
3768
       }
3767
     ],
3769
     ],
3768
     "_prefab": {
3770
     "_prefab": {
3769
-      "__id__": 107
3771
+      "__id__": 109
3770
     },
3772
     },
3771
     "_opacity": 255,
3773
     "_opacity": 255,
3772
     "_color": {
3774
     "_color": {
@@ -3820,21 +3822,21 @@
3820
     "_name": "Background",
3822
     "_name": "Background",
3821
     "_objFlags": 0,
3823
     "_objFlags": 0,
3822
     "_parent": {
3824
     "_parent": {
3823
-      "__id__": 99
3825
+      "__id__": 100
3824
     },
3826
     },
3825
     "_children": [
3827
     "_children": [
3826
       {
3828
       {
3827
-        "__id__": 101
3829
+        "__id__": 102
3828
       }
3830
       }
3829
     ],
3831
     ],
3830
     "_active": true,
3832
     "_active": true,
3831
     "_components": [
3833
     "_components": [
3832
       {
3834
       {
3833
-        "__id__": 104
3835
+        "__id__": 105
3834
       }
3836
       }
3835
     ],
3837
     ],
3836
     "_prefab": {
3838
     "_prefab": {
3837
-      "__id__": 105
3839
+      "__id__": 106
3838
     },
3840
     },
3839
     "_opacity": 255,
3841
     "_opacity": 255,
3840
     "_color": {
3842
     "_color": {
@@ -3888,17 +3890,17 @@
3888
     "_name": "TextTitle",
3890
     "_name": "TextTitle",
3889
     "_objFlags": 0,
3891
     "_objFlags": 0,
3890
     "_parent": {
3892
     "_parent": {
3891
-      "__id__": 100
3893
+      "__id__": 101
3892
     },
3894
     },
3893
     "_children": [],
3895
     "_children": [],
3894
     "_active": true,
3896
     "_active": true,
3895
     "_components": [
3897
     "_components": [
3896
       {
3898
       {
3897
-        "__id__": 102
3899
+        "__id__": 103
3898
       }
3900
       }
3899
     ],
3901
     ],
3900
     "_prefab": {
3902
     "_prefab": {
3901
-      "__id__": 103
3903
+      "__id__": 104
3902
     },
3904
     },
3903
     "_opacity": 255,
3905
     "_opacity": 255,
3904
     "_color": {
3906
     "_color": {
@@ -3952,7 +3954,7 @@
3952
     "_name": "",
3954
     "_name": "",
3953
     "_objFlags": 0,
3955
     "_objFlags": 0,
3954
     "node": {
3956
     "node": {
3955
-      "__id__": 101
3957
+      "__id__": 102
3956
     },
3958
     },
3957
     "_enabled": true,
3959
     "_enabled": true,
3958
     "_materials": [
3960
     "_materials": [
@@ -3995,7 +3997,7 @@
3995
     "_name": "",
3997
     "_name": "",
3996
     "_objFlags": 0,
3998
     "_objFlags": 0,
3997
     "node": {
3999
     "node": {
3998
-      "__id__": 100
4000
+      "__id__": 101
3999
     },
4001
     },
4000
     "_enabled": true,
4002
     "_enabled": true,
4001
     "_materials": [
4003
     "_materials": [
@@ -4038,7 +4040,7 @@
4038
     "_name": "",
4040
     "_name": "",
4039
     "_objFlags": 0,
4041
     "_objFlags": 0,
4040
     "node": {
4042
     "node": {
4041
-      "__id__": 99
4043
+      "__id__": 100
4042
     },
4044
     },
4043
     "_enabled": true,
4045
     "_enabled": true,
4044
     "_normalMaterial": {
4046
     "_normalMaterial": {
@@ -4047,7 +4049,11 @@
4047
     "_grayMaterial": null,
4049
     "_grayMaterial": null,
4048
     "duration": 0.1,
4050
     "duration": 0.1,
4049
     "zoomScale": 1.2,
4051
     "zoomScale": 1.2,
4050
-    "clickEvents": [],
4052
+    "clickEvents": [
4053
+      {
4054
+        "__id__": 108
4055
+      }
4056
+    ],
4051
     "_N$interactable": true,
4057
     "_N$interactable": true,
4052
     "_N$enableAutoGrayEffect": false,
4058
     "_N$enableAutoGrayEffect": false,
4053
     "_N$transition": 2,
4059
     "_N$transition": 2,
@@ -4097,27 +4103,25 @@
4097
     "_N$normalSprite": {
4103
     "_N$normalSprite": {
4098
       "__uuid__": "7d232ccc-6d99-4245-9ca6-9cb421d0ec63"
4104
       "__uuid__": "7d232ccc-6d99-4245-9ca6-9cb421d0ec63"
4099
     },
4105
     },
4100
-    "_N$pressedSprite": {
4101
-      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
4102
-    },
4103
-    "pressedSprite": {
4104
-      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
4105
-    },
4106
-    "_N$hoverSprite": {
4107
-      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
4108
-    },
4109
-    "hoverSprite": {
4110
-      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
4111
-    },
4112
-    "_N$disabledSprite": {
4113
-      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
4114
-    },
4106
+    "_N$pressedSprite": null,
4107
+    "pressedSprite": null,
4108
+    "_N$hoverSprite": null,
4109
+    "hoverSprite": null,
4110
+    "_N$disabledSprite": null,
4115
     "_N$target": {
4111
     "_N$target": {
4116
-      "__id__": 100
4112
+      "__id__": 101
4117
     },
4113
     },
4118
     "_id": ""
4114
     "_id": ""
4119
   },
4115
   },
4120
   {
4116
   {
4117
+    "__type__": "cc.ClickEvent",
4118
+    "target": null,
4119
+    "component": "",
4120
+    "_componentId": "",
4121
+    "handler": "",
4122
+    "customEventData": ""
4123
+  },
4124
+  {
4121
     "__type__": "cc.PrefabInfo",
4125
     "__type__": "cc.PrefabInfo",
4122
     "root": {
4126
     "root": {
4123
       "__id__": 1
4127
       "__id__": 1
@@ -4137,20 +4141,20 @@
4137
     },
4141
     },
4138
     "_children": [
4142
     "_children": [
4139
       {
4143
       {
4140
-        "__id__": 109
4144
+        "__id__": 111
4141
       },
4145
       },
4142
       {
4146
       {
4143
-        "__id__": 112
4147
+        "__id__": 114
4144
       }
4148
       }
4145
     ],
4149
     ],
4146
     "_active": true,
4150
     "_active": true,
4147
     "_components": [
4151
     "_components": [
4148
       {
4152
       {
4149
-        "__id__": 115
4153
+        "__id__": 117
4150
       }
4154
       }
4151
     ],
4155
     ],
4152
     "_prefab": {
4156
     "_prefab": {
4153
-      "__id__": 116
4157
+      "__id__": 118
4154
     },
4158
     },
4155
     "_opacity": 255,
4159
     "_opacity": 255,
4156
     "_color": {
4160
     "_color": {
@@ -4204,17 +4208,17 @@
4204
     "_name": "ImageGold",
4208
     "_name": "ImageGold",
4205
     "_objFlags": 0,
4209
     "_objFlags": 0,
4206
     "_parent": {
4210
     "_parent": {
4207
-      "__id__": 108
4211
+      "__id__": 110
4208
     },
4212
     },
4209
     "_children": [],
4213
     "_children": [],
4210
     "_active": true,
4214
     "_active": true,
4211
     "_components": [
4215
     "_components": [
4212
       {
4216
       {
4213
-        "__id__": 110
4217
+        "__id__": 112
4214
       }
4218
       }
4215
     ],
4219
     ],
4216
     "_prefab": {
4220
     "_prefab": {
4217
-      "__id__": 111
4221
+      "__id__": 113
4218
     },
4222
     },
4219
     "_opacity": 255,
4223
     "_opacity": 255,
4220
     "_color": {
4224
     "_color": {
@@ -4268,7 +4272,7 @@
4268
     "_name": "",
4272
     "_name": "",
4269
     "_objFlags": 0,
4273
     "_objFlags": 0,
4270
     "node": {
4274
     "node": {
4271
-      "__id__": 109
4275
+      "__id__": 111
4272
     },
4276
     },
4273
     "_enabled": true,
4277
     "_enabled": true,
4274
     "_materials": [
4278
     "_materials": [
@@ -4311,17 +4315,17 @@
4311
     "_name": "TextGold",
4315
     "_name": "TextGold",
4312
     "_objFlags": 0,
4316
     "_objFlags": 0,
4313
     "_parent": {
4317
     "_parent": {
4314
-      "__id__": 108
4318
+      "__id__": 110
4315
     },
4319
     },
4316
     "_children": [],
4320
     "_children": [],
4317
     "_active": true,
4321
     "_active": true,
4318
     "_components": [
4322
     "_components": [
4319
       {
4323
       {
4320
-        "__id__": 113
4324
+        "__id__": 115
4321
       }
4325
       }
4322
     ],
4326
     ],
4323
     "_prefab": {
4327
     "_prefab": {
4324
-      "__id__": 114
4328
+      "__id__": 116
4325
     },
4329
     },
4326
     "_opacity": 255,
4330
     "_opacity": 255,
4327
     "_color": {
4331
     "_color": {
@@ -4375,7 +4379,7 @@
4375
     "_name": "",
4379
     "_name": "",
4376
     "_objFlags": 0,
4380
     "_objFlags": 0,
4377
     "node": {
4381
     "node": {
4378
-      "__id__": 112
4382
+      "__id__": 114
4379
     },
4383
     },
4380
     "_enabled": true,
4384
     "_enabled": true,
4381
     "_materials": [
4385
     "_materials": [
@@ -4418,7 +4422,7 @@
4418
     "_name": "",
4422
     "_name": "",
4419
     "_objFlags": 0,
4423
     "_objFlags": 0,
4420
     "node": {
4424
     "node": {
4421
-      "__id__": 108
4425
+      "__id__": 110
4422
     },
4426
     },
4423
     "_enabled": true,
4427
     "_enabled": true,
4424
     "_layoutSize": {
4428
     "_layoutSize": {
@@ -4459,24 +4463,27 @@
4459
   },
4463
   },
4460
   {
4464
   {
4461
     "__type__": "cc.Node",
4465
     "__type__": "cc.Node",
4462
-    "_name": "ScrollView",
4466
+    "_name": "ScrollViewBox",
4463
     "_objFlags": 0,
4467
     "_objFlags": 0,
4464
     "_parent": {
4468
     "_parent": {
4465
       "__id__": 1
4469
       "__id__": 1
4466
     },
4470
     },
4467
     "_children": [
4471
     "_children": [
4468
       {
4472
       {
4469
-        "__id__": 118
4473
+        "__id__": 120
4470
       }
4474
       }
4471
     ],
4475
     ],
4472
     "_active": true,
4476
     "_active": true,
4473
     "_components": [
4477
     "_components": [
4474
       {
4478
       {
4475
-        "__id__": 125
4479
+        "__id__": 128
4480
+      },
4481
+      {
4482
+        "__id__": 129
4476
       }
4483
       }
4477
     ],
4484
     ],
4478
     "_prefab": {
4485
     "_prefab": {
4479
-      "__id__": 126
4486
+      "__id__": 130
4480
     },
4487
     },
4481
     "_opacity": 255,
4488
     "_opacity": 255,
4482
     "_color": {
4489
     "_color": {
@@ -4530,24 +4537,24 @@
4530
     "_name": "view",
4537
     "_name": "view",
4531
     "_objFlags": 0,
4538
     "_objFlags": 0,
4532
     "_parent": {
4539
     "_parent": {
4533
-      "__id__": 117
4540
+      "__id__": 119
4534
     },
4541
     },
4535
     "_children": [
4542
     "_children": [
4536
       {
4543
       {
4537
-        "__id__": 119
4544
+        "__id__": 121
4538
       }
4545
       }
4539
     ],
4546
     ],
4540
     "_active": true,
4547
     "_active": true,
4541
     "_components": [
4548
     "_components": [
4542
       {
4549
       {
4543
-        "__id__": 122
4550
+        "__id__": 125
4544
       },
4551
       },
4545
       {
4552
       {
4546
-        "__id__": 123
4553
+        "__id__": 126
4547
       }
4554
       }
4548
     ],
4555
     ],
4549
     "_prefab": {
4556
     "_prefab": {
4550
-      "__id__": 124
4557
+      "__id__": 127
4551
     },
4558
     },
4552
     "_opacity": 255,
4559
     "_opacity": 255,
4553
     "_color": {
4560
     "_color": {
@@ -4601,17 +4608,20 @@
4601
     "_name": "content",
4608
     "_name": "content",
4602
     "_objFlags": 0,
4609
     "_objFlags": 0,
4603
     "_parent": {
4610
     "_parent": {
4604
-      "__id__": 118
4611
+      "__id__": 120
4605
     },
4612
     },
4606
     "_children": [],
4613
     "_children": [],
4607
     "_active": true,
4614
     "_active": true,
4608
     "_components": [
4615
     "_components": [
4609
       {
4616
       {
4610
-        "__id__": 120
4617
+        "__id__": 122
4618
+      },
4619
+      {
4620
+        "__id__": 123
4611
       }
4621
       }
4612
     ],
4622
     ],
4613
     "_prefab": {
4623
     "_prefab": {
4614
-      "__id__": 121
4624
+      "__id__": 124
4615
     },
4625
     },
4616
     "_opacity": 255,
4626
     "_opacity": 255,
4617
     "_color": {
4627
     "_color": {
@@ -4623,20 +4633,20 @@
4623
     },
4633
     },
4624
     "_contentSize": {
4634
     "_contentSize": {
4625
       "__type__": "cc.Size",
4635
       "__type__": "cc.Size",
4626
-      "width": 369.8,
4627
-      "height": 400
4636
+      "width": 220,
4637
+      "height": 1
4628
     },
4638
     },
4629
     "_anchorPoint": {
4639
     "_anchorPoint": {
4630
       "__type__": "cc.Vec2",
4640
       "__type__": "cc.Vec2",
4631
-      "x": 0.5,
4632
-      "y": 1
4641
+      "x": 0,
4642
+      "y": 0.5
4633
     },
4643
     },
4634
     "_trs": {
4644
     "_trs": {
4635
       "__type__": "TypedArray",
4645
       "__type__": "TypedArray",
4636
       "ctor": "Float64Array",
4646
       "ctor": "Float64Array",
4637
       "array": [
4647
       "array": [
4648
+        -184.9,
4638
         0,
4649
         0,
4639
-        53,
4640
         0,
4650
         0,
4641
         0,
4651
         0,
4642
         0,
4652
         0,
@@ -4665,16 +4675,16 @@
4665
     "_name": "",
4675
     "_name": "",
4666
     "_objFlags": 0,
4676
     "_objFlags": 0,
4667
     "node": {
4677
     "node": {
4668
-      "__id__": 119
4678
+      "__id__": 121
4669
     },
4679
     },
4670
     "_enabled": true,
4680
     "_enabled": true,
4671
     "alignMode": 1,
4681
     "alignMode": 1,
4672
     "_target": null,
4682
     "_target": null,
4673
-    "_alignFlags": 41,
4683
+    "_alignFlags": 8,
4674
     "_left": 0,
4684
     "_left": 0,
4675
-    "_right": 0,
4685
+    "_right": 74.9,
4676
     "_top": 0,
4686
     "_top": 0,
4677
-    "_bottom": 0,
4687
+    "_bottom": -147,
4678
     "_verticalCenter": 0,
4688
     "_verticalCenter": 0,
4679
     "_horizontalCenter": 0,
4689
     "_horizontalCenter": 0,
4680
     "_isAbsLeft": true,
4690
     "_isAbsLeft": true,
@@ -4684,7 +4694,40 @@
4684
     "_isAbsHorizontalCenter": true,
4694
     "_isAbsHorizontalCenter": true,
4685
     "_isAbsVerticalCenter": true,
4695
     "_isAbsVerticalCenter": true,
4686
     "_originalWidth": 220,
4696
     "_originalWidth": 220,
4687
-    "_originalHeight": 0,
4697
+    "_originalHeight": 400,
4698
+    "_id": ""
4699
+  },
4700
+  {
4701
+    "__type__": "cc.Layout",
4702
+    "_name": "",
4703
+    "_objFlags": 0,
4704
+    "node": {
4705
+      "__id__": 121
4706
+    },
4707
+    "_enabled": true,
4708
+    "_layoutSize": {
4709
+      "__type__": "cc.Size",
4710
+      "width": 220,
4711
+      "height": 1
4712
+    },
4713
+    "_resize": 1,
4714
+    "_N$layoutType": 1,
4715
+    "_N$padding": 0,
4716
+    "_N$cellSize": {
4717
+      "__type__": "cc.Size",
4718
+      "width": 40,
4719
+      "height": 40
4720
+    },
4721
+    "_N$startAxis": 0,
4722
+    "_N$paddingLeft": 0,
4723
+    "_N$paddingRight": 0,
4724
+    "_N$paddingTop": 0,
4725
+    "_N$paddingBottom": 0,
4726
+    "_N$spacingX": 0,
4727
+    "_N$spacingY": 0,
4728
+    "_N$verticalDirection": 1,
4729
+    "_N$horizontalDirection": 0,
4730
+    "_N$affectedByScale": false,
4688
     "_id": ""
4731
     "_id": ""
4689
   },
4732
   },
4690
   {
4733
   {
@@ -4703,7 +4746,7 @@
4703
     "_name": "",
4746
     "_name": "",
4704
     "_objFlags": 0,
4747
     "_objFlags": 0,
4705
     "node": {
4748
     "node": {
4706
-      "__id__": 118
4749
+      "__id__": 120
4707
     },
4750
     },
4708
     "_enabled": true,
4751
     "_enabled": true,
4709
     "_materials": [
4752
     "_materials": [
@@ -4723,7 +4766,7 @@
4723
     "_name": "",
4766
     "_name": "",
4724
     "_objFlags": 0,
4767
     "_objFlags": 0,
4725
     "node": {
4768
     "node": {
4726
-      "__id__": 118
4769
+      "__id__": 120
4727
     },
4770
     },
4728
     "_enabled": true,
4771
     "_enabled": true,
4729
     "alignMode": 1,
4772
     "alignMode": 1,
@@ -4761,11 +4804,11 @@
4761
     "_name": "",
4804
     "_name": "",
4762
     "_objFlags": 0,
4805
     "_objFlags": 0,
4763
     "node": {
4806
     "node": {
4764
-      "__id__": 117
4807
+      "__id__": 119
4765
     },
4808
     },
4766
     "_enabled": true,
4809
     "_enabled": true,
4767
-    "horizontal": false,
4768
-    "vertical": true,
4810
+    "horizontal": true,
4811
+    "vertical": false,
4769
     "inertia": true,
4812
     "inertia": true,
4770
     "brake": 0.75,
4813
     "brake": 0.75,
4771
     "elastic": true,
4814
     "elastic": true,
@@ -4773,16 +4816,26 @@
4773
     "scrollEvents": [],
4816
     "scrollEvents": [],
4774
     "cancelInnerEvents": true,
4817
     "cancelInnerEvents": true,
4775
     "_N$content": {
4818
     "_N$content": {
4776
-      "__id__": 119
4819
+      "__id__": 121
4777
     },
4820
     },
4778
     "content": {
4821
     "content": {
4779
-      "__id__": 119
4822
+      "__id__": 121
4780
     },
4823
     },
4781
     "_N$horizontalScrollBar": null,
4824
     "_N$horizontalScrollBar": null,
4782
     "_N$verticalScrollBar": null,
4825
     "_N$verticalScrollBar": null,
4783
     "_id": ""
4826
     "_id": ""
4784
   },
4827
   },
4785
   {
4828
   {
4829
+    "__type__": "5fda8MpYDpKDoUJP269PaJX",
4830
+    "_name": "",
4831
+    "_objFlags": 0,
4832
+    "node": {
4833
+      "__id__": 119
4834
+    },
4835
+    "_enabled": true,
4836
+    "_id": ""
4837
+  },
4838
+  {
4786
     "__type__": "cc.PrefabInfo",
4839
     "__type__": "cc.PrefabInfo",
4787
     "root": {
4840
     "root": {
4788
       "__id__": 1
4841
       "__id__": 1
@@ -4813,14 +4866,17 @@
4813
     "textRoundNum": {
4866
     "textRoundNum": {
4814
       "__id__": 15
4867
       "__id__": 15
4815
     },
4868
     },
4869
+    "textGold": {
4870
+      "__id__": 115
4871
+    },
4816
     "buttonWatch": {
4872
     "buttonWatch": {
4817
       "__id__": 97
4873
       "__id__": 97
4818
     },
4874
     },
4819
     "buttonFight": {
4875
     "buttonFight": {
4820
-      "__id__": 106
4876
+      "__id__": 107
4821
     },
4877
     },
4822
     "goldLayout": {
4878
     "goldLayout": {
4823
-      "__id__": 108
4879
+      "__id__": 110
4824
     },
4880
     },
4825
     "playerTop": {
4881
     "playerTop": {
4826
       "__id__": 18
4882
       "__id__": 18
@@ -4829,13 +4885,16 @@
4829
       "__id__": 41
4885
       "__id__": 41
4830
     },
4886
     },
4831
     "player1": {
4887
     "player1": {
4832
-      "__id__": 36
4888
+      "__id__": 80
4833
     },
4889
     },
4834
     "player2": {
4890
     "player2": {
4835
       "__id__": 59
4891
       "__id__": 59
4836
     },
4892
     },
4837
     "player3": {
4893
     "player3": {
4838
-      "__id__": 80
4894
+      "__id__": 36
4895
+    },
4896
+    "scrollViewBox": {
4897
+      "__id__": 128
4839
     },
4898
     },
4840
     "_id": ""
4899
     "_id": ""
4841
   },
4900
   },

+ 5 - 7
assets/resources/edt_prefab/BoxContains/BoxItem.prefab

@@ -116,8 +116,8 @@
116
     },
116
     },
117
     "_contentSize": {
117
     "_contentSize": {
118
       "__type__": "cc.Size",
118
       "__type__": "cc.Size",
119
-      "width": 400,
120
-      "height": 319
119
+      "width": 299,
120
+      "height": 116
121
     },
121
     },
122
     "_anchorPoint": {
122
     "_anchorPoint": {
123
       "__type__": "cc.Vec2",
123
       "__type__": "cc.Vec2",
@@ -168,9 +168,7 @@
168
     ],
168
     ],
169
     "_srcBlendFactor": 770,
169
     "_srcBlendFactor": 770,
170
     "_dstBlendFactor": 771,
170
     "_dstBlendFactor": 771,
171
-    "_spriteFrame": {
172
-      "__uuid__": "d9e93c14-b1c5-4357-9c31-a8c57de9fd8a"
173
-    },
171
+    "_spriteFrame": null,
174
     "_type": 0,
172
     "_type": 0,
175
     "_sizeMode": 1,
173
     "_sizeMode": 1,
176
     "_fillType": 0,
174
     "_fillType": 0,
@@ -223,8 +221,8 @@
223
     },
221
     },
224
     "_contentSize": {
222
     "_contentSize": {
225
       "__type__": "cc.Size",
223
       "__type__": "cc.Size",
226
-      "width": 40,
227
-      "height": 36
224
+      "width": 299,
225
+      "height": 116
228
     },
226
     },
229
     "_anchorPoint": {
227
     "_anchorPoint": {
230
       "__type__": "cc.Vec2",
228
       "__type__": "cc.Vec2",

+ 1 - 0
assets/script/app/constants/AppConstants.js

@@ -76,6 +76,7 @@ window.JMC.PUBLIC_MSG = cc.Enum({
76
 window.JMC.PUBLIC_MSG_ORDER = cc.Enum({
76
 window.JMC.PUBLIC_MSG_ORDER = cc.Enum({
77
     LOGIN: -1,          // 登录
77
     LOGIN: -1,          // 登录
78
     BAG: -1,            // 背包
78
     BAG: -1,            // 背包
79
+    BATTLE:-1,          // 战斗
79
 });
80
 });
80
 
81
 
81
 
82
 

+ 22 - 4
assets/script/app/view/battle/BattleMain.js

@@ -64,7 +64,19 @@ cc.Class({
64
 
64
 
65
         roomContent: {
65
         roomContent: {
66
             default: null,
66
             default: null,
67
-            type: cc.Node,
67
+            type: cc.Layout,
68
+            serializable: true,
69
+        },
70
+
71
+        bottomLayout: {
72
+            default: null,
73
+            type: cc.Layout,
74
+            serializable: true,
75
+        },
76
+
77
+        layerLayout: {
78
+            default: null,
79
+            type: cc.Layout,
68
             serializable: true,
80
             serializable: true,
69
         },
81
         },
70
 
82
 
@@ -100,7 +112,7 @@ cc.Class({
100
 
112
 
101
         this.onClickPrice(null, "0");
113
         this.onClickPrice(null, "0");
102
         
114
         
103
-        cc.game.on(JMC.PUBLIC_MSG.ROOM_GET_INFO, this.updateRoom, this);
115
+        G.PublicMgr.on(JMC.PUBLIC_MSG.ROOM_GET_INFO, JMC.PUBLIC_MSG_ORDER.BATTLE, this.updateRoom, this);
104
         G.BattleMgr.requestInfo()
116
         G.BattleMgr.requestInfo()
105
     },
117
     },
106
 
118
 
@@ -119,13 +131,19 @@ cc.Class({
119
         let rooms = G.BattleMgr.getRoomList()
131
         let rooms = G.BattleMgr.getRoomList()
120
         for(let room of rooms)
132
         for(let room of rooms)
121
         {
133
         {
122
-            this.addRoom(room)
134
+            let roomNode = this.addRoom(room);
135
+            let roomCell = roomNode.getComponent(BattleRoomPreviweCell);
136
+            roomCell.resetData(room);
123
         }
137
         }
138
+        this.roomContent.updateLayout();
139
+        this.bottomLayout.updateLayout();
140
+        // this.layerLayout.updateLayout();
124
     },
141
     },
125
     
142
     
126
     addRoom(data) {
143
     addRoom(data) {
127
         let node = cc.instantiate(this.roomPreviewPrefab);
144
         let node = cc.instantiate(this.roomPreviewPrefab);
128
-        this.roomContent.addChild(node);
145
+        this.roomContent.node.addChild(node);
146
+        return node;
129
     },
147
     },
130
 
148
 
131
     removeRoom(data) {
149
     removeRoom(data) {

+ 1 - 1
assets/script/app/view/battle/BattleRoom.js

@@ -79,7 +79,7 @@ cc.Class({
79
             playerCell.resetData(player);
79
             playerCell.resetData(player);
80
             playerCell.setActive(isShow);
80
             playerCell.setActive(isShow);
81
         }
81
         }
82
-        this.playerLayout.updateLayout()
82
+        this.playerLayout.updateLayout();
83
     },
83
     },
84
 
84
 
85
     refreshBoxs() {
85
     refreshBoxs() {

+ 14 - 0
assets/script/app/view/battle/BattleRoomPlayerIcon.js

@@ -15,6 +15,20 @@ cc.Class({
15
             serializable: true,
15
             serializable: true,
16
         },
16
         },
17
     },
17
     },
18
+    
19
+    resetData(data) {
20
+        this.data = data;
21
+        this.refreshView();
22
+    },
23
+    
24
+    refreshView(){
25
+        this.imageAdd.node.active = this.data == null;
26
+        this.headIcon.node.active = this.data != null;
27
+        if (this.data == null) {
28
+            return;
29
+        }
30
+        this.headIcon.setPlayerInfo(this.data.playerInfo);
31
+    },
18
 
32
 
19
     onClickHead() {
33
     onClickHead() {
20
 
34
 

+ 72 - 3
assets/script/app/view/battle/BattleRoomPreviweCell.js

@@ -1,14 +1,18 @@
1
-var BattleRoomPlayerIcon = require("BattleRoomPlayerIcon")
1
+const BattleRoomPlayerIcon = require("BattleRoomPlayerIcon")
2
+const BattleRoomSelectCell = require("BattleRoomSelectCell")
3
+const ViewBase = require("ViewBase")
4
+
5
+const SequenCreateView = require('SequenCreateView');
2
 
6
 
3
 cc.Class({
7
 cc.Class({
4
-    extends: cc.Component,
8
+    extends: ViewBase,
5
     properties: {
9
     properties: {
6
         imageBg: {
10
         imageBg: {
7
             default: null,
11
             default: null,
8
             type: cc.Sprite,
12
             type: cc.Sprite,
9
             serializable: true,
13
             serializable: true,
10
         },
14
         },
11
-        
15
+
12
         textStatus: {
16
         textStatus: {
13
             default: null,
17
             default: null,
14
             type: cc.Label,
18
             type: cc.Label,
@@ -27,6 +31,12 @@ cc.Class({
27
             serializable: true,
31
             serializable: true,
28
         },
32
         },
29
 
33
 
34
+        textGold: {
35
+            default: null,
36
+            type: cc.Label,
37
+            serializable: true,
38
+        },
39
+
30
         buttonWatch: {
40
         buttonWatch: {
31
             default: null,
41
             default: null,
32
             type: cc.Button,
42
             type: cc.Button,
@@ -74,12 +84,71 @@ cc.Class({
74
             type: BattleRoomPlayerIcon,
84
             type: BattleRoomPlayerIcon,
75
             serializable: true,
85
             serializable: true,
76
         },
86
         },
87
+
88
+        scrollViewBox: {
89
+            default: null,
90
+            type: cc.ScrollView,
91
+            serializable: true,
92
+        },
93
+    },
94
+
95
+    onLoad () {
96
+        this.players = [
97
+            this.player1,
98
+            this.player2,
99
+            this.player3,
100
+        ];
101
+
102
+        this.sequenCreateBoxs = new SequenCreateView().initRoot(this);
77
     },
103
     },
78
 
104
 
79
     setButtonSubShow(b) {
105
     setButtonSubShow(b) {
80
         this.buttonSub.node.active = b;
106
         this.buttonSub.node.active = b;
81
     },
107
     },
82
 
108
 
109
+    resetData(data) {
110
+        this.data = data;
111
+        this.refreshView();
112
+    },
113
+
114
+    refreshView() {
115
+        if (this.data == null) {
116
+            return;
117
+        }
118
+
119
+        this.textStatus.string = this.data.status == 0 ? "等待中" : (this.data.status == 1 ? "进行中" : "结束");
120
+        this.textGold.string = G.PlayerUtils.getPrice(this.getBoxsPrice());
121
+        this.textPreviewNum.string = this.data.playCount + "人观看";
122
+        this.textRoundNum.string = this.data.battleBoxList.length + "回合";
123
+        this.playerTop.active = this.data.playerList.length >= 3;
124
+        for (let i = 0; i < 3; i++) {
125
+            let playerIcon = this.players[i];
126
+            let playerData = this.data.playerList.length > i ? this.data.playerList[i] : null;
127
+            playerIcon.resetData(playerData);
128
+        }
129
+        this.refreshBoxs();
130
+    },
131
+
132
+    refreshBoxs() {
133
+        let self = this;
134
+        this.sequenCreateBoxs.addDatas(this.data.battleBoxList);
135
+        this.sequenCreateBoxs.startCreate(JMC.UIEnum.BattleRoomSelectCell, this.scrollViewBox.content, function(node, index, data) {
136
+            let boxItem = node.getComponent(BattleRoomSelectCell);
137
+            boxItem.setIndex(index);
138
+            boxItem.setData(data);
139
+            boxItem.setButtonSubShow(false)
140
+        });
141
+    },
142
+
143
+    getBoxsPrice() {
144
+        let price = 0;
145
+        for (let b of this.data.battleBoxList) {
146
+            let cfg = G.CfgMgr.battleBoxConfig.getByMainKey(b);
147
+            price += cfg.price;
148
+        }
149
+        return price;
150
+    },
151
+
83
     onClickCell() {
152
     onClickCell() {
84
         if (this.onClickCb) {
153
         if (this.onClickCb) {
85
             this.onClickCb(this.index, this.data)
154
             this.onClickCb(this.index, this.data)

+ 55 - 0
assets/script/framework/UIScrollViewEventSync.js

@@ -0,0 +1,55 @@
1
+cc.Class({
2
+    extends: cc.Component,
3
+    properties: {
4
+        
5
+    },
6
+    onLoad () {
7
+        let scrollView = this.node.getComponent(cc.ScrollView);
8
+        if (scrollView == null) {
9
+            return;
10
+        }
11
+        let parentScrollView = this.getComponentInParent(cc.ScrollView);
12
+        if (parentScrollView == null) {
13
+            return;
14
+        }
15
+
16
+        this.parentScrollView = parentScrollView;
17
+
18
+        this.oldOnTouchBegan = scrollView._onTouchBegan.bind(scrollView);
19
+        this.oldOnTouchMoved  = scrollView._onTouchMoved.bind(scrollView);
20
+        this.oldOnTouchEnded  = scrollView._onTouchEnded.bind(scrollView);
21
+
22
+        scrollView._onTouchBegan = this.onTouchBegan.bind(this);
23
+        scrollView._onTouchMoved = this.onTouchMoved.bind(this);
24
+        scrollView._onTouchEnded = this.onTouchEnded.bind(this);
25
+    },
26
+
27
+    onTouchBegan(event, captureListeners) {
28
+        this.oldOnTouchBegan(event, captureListeners);
29
+        this.parentScrollView._onTouchBegan(event, captureListeners);
30
+    },
31
+    
32
+    onTouchMoved(event, captureListeners) {
33
+        this.oldOnTouchMoved(event, captureListeners);
34
+        this.parentScrollView._onTouchMoved(event, captureListeners);
35
+    },
36
+
37
+    onTouchEnded(event, captureListeners) {
38
+        this.oldOnTouchEnded(event, captureListeners);
39
+        this.parentScrollView._onTouchEnded(event, captureListeners);
40
+    },
41
+
42
+    getComponentInParent(component) {
43
+        let parent = this.node.parent;
44
+        let result = null;
45
+        while(parent != null) {
46
+            let scrollView = parent.getComponent(component);
47
+            if (scrollView != null) {
48
+                result = scrollView;
49
+                break;
50
+            }
51
+            parent = parent.parent;
52
+        }
53
+        return result;
54
+    },
55
+});

+ 9 - 0
assets/script/framework/UIScrollViewEventSync.js.meta

@@ -0,0 +1,9 @@
1
+{
2
+  "ver": "1.0.8",
3
+  "uuid": "5fda8329-603a-4a0e-8509-3f6ebd3da257",
4
+  "isPlugin": false,
5
+  "loadPluginInWeb": true,
6
+  "loadPluginInNative": true,
7
+  "loadPluginInEditor": false,
8
+  "subMetas": {}
9
+}