Commit bbe9220d authored by liujiangnan's avatar liujiangnan

feat: 兼容多剧本

parent 914e24ee
...@@ -81,13 +81,13 @@ ...@@ -81,13 +81,13 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 48 "__id__": 45
}, },
{ {
"__id__": 49 "__id__": 46
}, },
{ {
"__id__": 50 "__id__": 47
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -770,15 +770,21 @@ ...@@ -770,15 +770,21 @@
}, },
{ {
"__id__": 22 "__id__": 22
},
{
"__id__": 33
},
{
"__id__": 35
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 46 "__id__": 43
}, },
{ {
"__id__": 47 "__id__": 44
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1079,7 +1085,7 @@ ...@@ -1079,7 +1085,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "layout", "_name": "item",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 15 "__id__": 15
...@@ -1089,88 +1095,19 @@ ...@@ -1089,88 +1095,19 @@
"__id__": 23 "__id__": 23
}, },
{ {
"__id__": 34 "__id__": 25
}
],
"_active": true,
"_components": [
{
"__id__": 45
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1005,
"height": 500
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-506.881,
4.345,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "56/sBtC7VFHJJGC9pGUtu3"
},
{
"__type__": "cc.Node",
"_name": "item",
"_objFlags": 0,
"_parent": {
"__id__": 22
},
"_children": [
{
"__id__": 24
},
{
"__id__": 26
}, },
{ {
"__id__": 28 "__id__": 27
}, },
{ {
"__id__": 30 "__id__": 29
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 33 "__id__": 32
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1196,7 +1133,7 @@ ...@@ -1196,7 +1133,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
210, -410,
0, 0,
0, 0,
0, 0,
...@@ -1219,20 +1156,20 @@ ...@@ -1219,20 +1156,20 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "12/+NrSahHYq/w0E8Is+4s" "_id": "3eQYdC1q1EeIQmInZLMQYz"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "bg_color", "_name": "bg_color",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 23 "__id__": 22
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 25 "__id__": 24
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1281,14 +1218,14 @@ ...@@ -1281,14 +1218,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "71w7fTdttP85A4Mf7ez/Wb" "_id": "2cWOJO4M5B+LDw4WxceOYN"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 23
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1313,20 +1250,20 @@ ...@@ -1313,20 +1250,20 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "a4WWbhmlFCDotihPPJheiC" "_id": "3cE57OuzNKAbRWUg5NYc+3"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "icon", "_name": "icon",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 23 "__id__": 22
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 27 "__id__": 26
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1375,14 +1312,14 @@ ...@@ -1375,14 +1312,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "71K3SHYplIeLHh6E74FliR" "_id": "99vy3EHmxH/7FgWBLwNKM+"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 26 "__id__": 25
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1407,20 +1344,20 @@ ...@@ -1407,20 +1344,20 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "f8DwVJcixO2YjrdQgNvESo" "_id": "f9lHRe5jROWaFdHUOxY0gr"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "bg", "_name": "bg",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 23 "__id__": 22
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 29 "__id__": 28
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1469,14 +1406,14 @@ ...@@ -1469,14 +1406,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "9c4jkmJFZIYpBgbetbRvKw" "_id": "bdcFJ0EO1HoaQN4lPdJtAM"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 28 "__id__": 27
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1501,23 +1438,23 @@ ...@@ -1501,23 +1438,23 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "eecpkfrH1KBLZsNy7rbmQS" "_id": "ffkn6fnyFHqLIlXfVUmPud"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "title", "_name": "title",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 23 "__id__": 22
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 31 "__id__": 30
}, },
{ {
"__id__": 32 "__id__": 31
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1566,14 +1503,14 @@ ...@@ -1566,14 +1503,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "e6z6BzTX9E/IgdFGFmw4Fj" "_id": "07MTmVvRlEsaceRKeTbgrr"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 30 "__id__": 29
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1601,14 +1538,14 @@ ...@@ -1601,14 +1538,14 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "32c78sDTpLX7pdhhIvl5Gc" "_id": "8eq1F5deRJgYBVyi0iBWZ/"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 30 "__id__": 29
}, },
"_enabled": true, "_enabled": true,
"_color": { "_color": {
...@@ -1619,14 +1556,14 @@ ...@@ -1619,14 +1556,14 @@
"a": 255 "a": 255
}, },
"_width": 2, "_width": 2,
"_id": "8eaa0nc7JBn52XL2XbxZ+s" "_id": "9evA1ZurdM1Z0jxeobeIOZ"
}, },
{ {
"__type__": "cc.Button", "__type__": "cc.Button",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 23 "__id__": 22
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -1687,35 +1624,22 @@ ...@@ -1687,35 +1624,22 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 23 "__id__": 22
}, },
"_id": "a66Q8YZLlAVJMWzKZARhFE" "_id": "d9O0zJFQxNXIzJb7vDgXkS"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "item", "_name": "layout",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 22 "__id__": 15
}, },
"_children": [ "_children": [],
{
"__id__": 35
},
{
"__id__": 37
},
{
"__id__": 39
},
{
"__id__": 41
}
],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 44 "__id__": 34
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1729,20 +1653,20 @@ ...@@ -1729,20 +1653,20 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 420, "width": -165,
"height": 490 "height": 500
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0,
"y": 0.5 "y": 0.5
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
795, -506.881,
0, 4.345,
0, 0,
0, 0,
0, 0,
...@@ -1764,47 +1688,86 @@ ...@@ -1764,47 +1688,86 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "4bfjd5K5dNcrMisJBzD2ZY" "_id": "56/sBtC7VFHJJGC9pGUtu3"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": -165,
"height": 500
},
"_resize": 1,
"_N$layoutType": 1,
"_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": 165,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "8f2vVQWD9OzJB3Oz8AeFno"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "bg_color", "_name": "scrollview",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 34 "__id__": 15
}, },
"_children": [], "_children": [
{
"__id__": 36
}
],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 36 "__id__": 41
},
{
"__id__": 42
} }
], ],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 253, "r": 255,
"g": 168, "g": 255,
"b": 49, "b": 255,
"a": 255 "a": 255
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 320, "width": 1334,
"height": 370 "height": 600
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0,
"y": 0.5 "y": 0.5
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-667,
0, 0,
40.175,
0, 0,
0, 0,
0, 0,
...@@ -1826,52 +1789,27 @@ ...@@ -1826,52 +1789,27 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "54DvFG5aBCr7epm2LwgevJ" "_id": "2b/bhRvQ1J94cFg+vlopfi"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Node",
"_name": "", "_name": "view",
"_objFlags": 0, "_objFlags": 0,
"node": { "_parent": {
"__id__": 35 "__id__": 35
}, },
"_enabled": true, "_children": [
"_materials": [
{ {
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" "__id__": 37
} }
], ],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "e5c3i7nj9MwYaFF5/1RHrO"
},
{
"__type__": "cc.Node",
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 34
},
"_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 38 "__id__": 39
},
{
"__id__": 40
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1885,12 +1823,12 @@ ...@@ -1885,12 +1823,12 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 320, "width": 1334,
"height": 370 "height": 600
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0,
"y": 0.5 "y": 0.5
}, },
"_trs": { "_trs": {
...@@ -1898,7 +1836,7 @@ ...@@ -1898,7 +1836,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
40.175, 0,
0, 0,
0, 0,
0, 0,
...@@ -1920,52 +1858,20 @@ ...@@ -1920,52 +1858,20 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "72ScUUDqVMO63dDmLAywI/" "_id": "8azFI6U59N0Z4ImGUxHVcc"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Node",
"_name": "", "_name": "content",
"_objFlags": 0, "_objFlags": 0,
"node": { "_parent": {
"__id__": 37 "__id__": 36
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "97aPpLTclIjZcKAOpzL4PA"
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 34
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 40 "__id__": 38
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1979,12 +1885,12 @@ ...@@ -1979,12 +1885,12 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 415, "width": 440,
"height": 477 "height": 600
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0,
"y": 0.5 "y": 0.5
}, },
"_trs": { "_trs": {
...@@ -2014,111 +1920,46 @@ ...@@ -2014,111 +1920,46 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "0fNAMSpLVP+JYiiOHaeZIc" "_id": "76NQAjHttF7ITGxuj2ePxg"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Layout",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 39 "__id__": 37
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_layoutSize": {
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a567032b-3f3a-41ad-8c14-5b2e20a5c9b1"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "146VOaDWFDZYHWoJKPa4CO"
},
{
"__type__": "cc.Node",
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 34
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
},
{
"__id__": 43
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 214, "width": 300,
"height": 54.4 "height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-165.231,
0,
0,
0,
0,
1,
1,
1,
1
]
}, },
"_eulerAngles": { "_resize": 1,
"__type__": "cc.Vec3", "_N$layoutType": 1,
"x": 0, "_N$cellSize": {
"y": 0, "__type__": "cc.Size",
"z": 0 "width": 40,
"height": 40
}, },
"_skewX": 0, "_N$startAxis": 0,
"_skewY": 0, "_N$paddingLeft": 100,
"_is3DNode": false, "_N$paddingRight": 100,
"_groupIndex": 0, "_N$paddingTop": 0,
"groupIndex": 0, "_N$paddingBottom": 0,
"_id": "deoV3+Mg9KiZ6VyZc8/NmS" "_N$spacingX": 50,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "2bty5tu9dGZYF5H0k/B+Su"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Mask",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 41 "__id__": 36
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2126,147 +1967,92 @@ ...@@ -2126,147 +1967,92 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
} }
], ],
"_srcBlendFactor": 770, "_spriteFrame": null,
"_dstBlendFactor": 771, "_type": 0,
"_string": "小红帽历险记", "_segments": 64,
"_N$string": "小红帽历险记", "_N$alphaThreshold": 0,
"_fontSize": 35, "_N$inverted": false,
"_lineHeight": 40, "_id": "fcNCjIm/pLBqJ2Ovz7/dDx"
"_enableWrapText": true,
"_N$file": {
"__uuid__": "013bd6df-3d03-41c1-9a89-e5911eb73164"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "bcoYeQWoNHn5J6sLCV6T7f"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.Widget",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 41 "__id__": 36
}, },
"_enabled": true, "_enabled": true,
"_color": { "alignMode": 1,
"__type__": "cc.Color", "_target": null,
"r": 66, "_alignFlags": 40,
"g": 166, "_left": 0,
"b": 24, "_right": 0,
"a": 255 "_top": 0,
}, "_bottom": 0,
"_width": 2, "_verticalCenter": 0,
"_id": "e3vazYs4JGXKRMEZNK3A8u" "_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 240,
"_originalHeight": 0,
"_id": "1ceO2daqdAIK5EPiVlRkUh"
}, },
{ {
"__type__": "cc.Button", "__type__": "cc.ScrollView",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 34 "__id__": 35
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "horizontal": true,
"_grayMaterial": null, "vertical": false,
"duration": 0.1, "inertia": true,
"zoomScale": 1.2, "brake": 0.75,
"clickEvents": [], "elastic": true,
"_N$interactable": true, "bounceDuration": 0.23,
"_N$enableAutoGrayEffect": false, "scrollEvents": [],
"_N$transition": 0, "cancelInnerEvents": true,
"transition": 0, "_N$content": {
"_N$normalColor": { "__id__": 37
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
}, },
"_N$normalSprite": null, "content": {
"_N$pressedSprite": null, "__id__": 37
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 34
}, },
"_id": "05jE/VrAxK+LI/9suQUwuT" "_N$horizontalScrollBar": null,
"_N$verticalScrollBar": null,
"_id": "72uaWMfJpDF5mCjOmnj3/t"
}, },
{ {
"__type__": "cc.Layout", "__type__": "cc.Widget",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 22 "__id__": 35
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "alignMode": 1,
"__type__": "cc.Size", "_target": null,
"width": 1005, "_alignFlags": 40,
"height": 500 "_left": 0,
}, "_right": 0,
"_resize": 1, "_top": 0,
"_N$layoutType": 1, "_bottom": 0,
"_N$cellSize": { "_verticalCenter": 0,
"__type__": "cc.Size", "_horizontalCenter": 0,
"width": 40, "_isAbsLeft": true,
"height": 40 "_isAbsRight": true,
}, "_isAbsTop": true,
"_N$startAxis": 0, "_isAbsBottom": true,
"_N$paddingLeft": 0, "_isAbsHorizontalCenter": true,
"_N$paddingRight": 0, "_isAbsVerticalCenter": true,
"_N$paddingTop": 0, "_originalWidth": 240,
"_N$paddingBottom": 0, "_originalHeight": 0,
"_N$spacingX": 165, "_id": "94dH5/mbBG2oKFaNmezkfS"
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "8f2vVQWD9OzJB3Oz8AeFno"
}, },
{ {
"__type__": "d4badAh1ItHILlMpvAfCvjP", "__type__": "d4badAh1ItHILlMpvAfCvjP",
......
...@@ -8,13 +8,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -8,13 +8,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadImage() { addPreloadImage() {
// TODO 根据自己的配置预加载图片资源 // TODO 根据自己的配置预加载图片资源
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
} }
addPreloadAudio() { addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源 // TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: this.data.audio_url });
} }
addPreloadAnima() { addPreloadAnima() {
...@@ -52,10 +49,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -52,10 +49,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
}); });
} }
toPage1(testData = null) { toPage1(testData = null) {
testData = { left: this.data.left, right: this.data.right };
this.page1.active = true; this.page1.active = true;
this.page1.getComponent('page1').setData(testData) this.page1.getComponent('page1').setData(this.data)
} }
playLocalAudio(audioName) { playLocalAudio(audioName) {
......
...@@ -12,7 +12,7 @@ export default class NewClass extends cc.Component { ...@@ -12,7 +12,7 @@ export default class NewClass extends cc.Component {
private list: Array<{ img, name, id }>; private list: Array<{ img, name, id }>;
//TODO:入口方法 //TODO:入口方法
public setData(val) { public setData(val) {
this.list = [val.left, val.right]; this.list = val;
this.initView(); this.initView();
} }
//TODO:点击事件 //TODO:点击事件
...@@ -25,14 +25,25 @@ export default class NewClass extends cc.Component { ...@@ -25,14 +25,25 @@ export default class NewClass extends cc.Component {
} }
private layout: cc.Node; private layout: cc.Node;
private item: cc.Node;
onLoad() { onLoad() {
this.item = this.node.getChildByName("item");
this.item.active = false;
this.layout = this.node.getChildByName("layout"); this.layout = this.node.getChildByName("layout");
} }
initView() { initView() {
let children = this.layout.children; if (this.list.length < 3) {
this.list.forEach((data, index) => { this.layout = this.node.getChildByName("layout");
let item = children[index]; this.layout.width = this.list.length == 2 ? 880 : 440;
} else {
let scrollview = this.node.getChildByName("scrollview");
let view = scrollview.getChildByName("view");
this.layout = view.getChildByName("content");
}
this.list.forEach((data) => {
let item = cc.instantiate(this.item);
this.updateItem(item, data); this.updateItem(item, data);
this.layout.addChild(item)
}) })
} }
updateItem(item: any, data) { updateItem(item: any, data) {
...@@ -45,8 +56,6 @@ export default class NewClass extends cc.Component { ...@@ -45,8 +56,6 @@ export default class NewClass extends cc.Component {
title.getComponent(cc.Label).string = data.name; title.getComponent(cc.Label).string = data.name;
item.on(cc.Node.EventType.TOUCH_END, this.onTouchItem, this); item.on(cc.Node.EventType.TOUCH_END, this.onTouchItem, this);
} }
setNetImg(item, url, { w, h }) { setNetImg(item, url, { w, h }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!item) return console.log("图片更换失败,传入了错误的item"); if (!item) return console.log("图片更换失败,传入了错误的item");
......
// 新剧本地图页 // 新剧本地图页
export const defaultData = { export const defaultData = [
//左右两个 {
left: {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg', img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记', name: '小红帽历险记',
id: 1234, id: 1234,
}, },{
right: {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg', img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '大红帽历险记', name: '大红帽历险记',
id: 1235, id: 1235,
}, },{
//固定3个
eventList: [{
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg', img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记', name: '三红帽历险记',
totalIcon: 0,
locked: false,
id: 1234,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '中红帽历险记',
totalIcon: 100,
locked: false,
id: 1235, id: 1235,
}, { },{
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '大红帽历险记',
totalIcon: 100,
locked: true,
id: 1236,
}],
//游戏列表
gameList: [{
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg', img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记1', name: '四红帽历险记',
locked: false,
id: 1231,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记2',
locked: false,
id: 1232,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记3',
locked: false,
id: 1233,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记4',
locked: false,
id: 1234,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记5',
locked: false,
id: 1235, id: 1235,
}], },
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment