Commit 69438bc8 authored by liujiangnan's avatar liujiangnan

feat: 滚动条

parent f54e1001
...@@ -78,25 +78,25 @@ ...@@ -78,25 +78,25 @@
"__id__": 8 "__id__": 8
}, },
{ {
"__id__": 10 "__id__": 11
}, },
{ {
"__id__": 12 "__id__": 14
}, },
{ {
"__id__": 14 "__id__": 17
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 52 "__id__": 51
}, },
{ {
"__id__": 53 "__id__": 52
}, },
{ {
"__id__": 54 "__id__": 53
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -381,6 +381,9 @@ ...@@ -381,6 +381,9 @@
"_components": [ "_components": [
{ {
"__id__": 9 "__id__": 9
},
{
"__id__": 10
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -463,6 +466,33 @@ ...@@ -463,6 +466,33 @@
"_atlas": null, "_atlas": null,
"_id": "1aiDURhp5MDr+ZmFg8uuS5" "_id": "1aiDURhp5MDr+ZmFg8uuS5"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 2,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "1fR0duml1Co71zj441BZb/"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "bg_video_shadow", "_name": "bg_video_shadow",
...@@ -474,7 +504,10 @@ ...@@ -474,7 +504,10 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 11 "__id__": 12
},
{
"__id__": 13
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -501,7 +534,7 @@ ...@@ -501,7 +534,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
0, 42.166,
0, 0,
0, 0,
0, 0,
...@@ -530,7 +563,7 @@ ...@@ -530,7 +563,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 10 "__id__": 11
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -557,6 +590,33 @@ ...@@ -557,6 +590,33 @@
"_atlas": null, "_atlas": null,
"_id": "fflWbs24xI97snvCfwg/Q6" "_id": "fflWbs24xI97snvCfwg/Q6"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 2,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 103.22800000000001,
"_verticalCenter": 20,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "baoENL+MpIHrW+D+PsDUqQ"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "VideoNode", "_name": "VideoNode",
...@@ -568,7 +628,10 @@ ...@@ -568,7 +628,10 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 13 "__id__": 15
},
{
"__id__": 16
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -595,7 +658,7 @@ ...@@ -595,7 +658,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
0, 57.701,
0, 0,
0, 0,
0, 0,
...@@ -624,7 +687,7 @@ ...@@ -624,7 +687,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 12 "__id__": 14
}, },
"_enabled": true, "_enabled": true,
"_resourceType": 0, "_resourceType": 0,
...@@ -639,6 +702,33 @@ ...@@ -639,6 +702,33 @@
"_N$keepAspectRatio": true, "_N$keepAspectRatio": true,
"_id": "fce7ZaGl9IwYI1a7QJjapU" "_id": "fce7ZaGl9IwYI1a7QJjapU"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 2,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 145.72800000000004,
"_verticalCenter": 20,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "1fqYsocEpLwaEFWHsef/gC"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "Controls", "_name": "Controls",
...@@ -648,13 +738,13 @@ ...@@ -648,13 +738,13 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 15 "__id__": 18
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 51 "__id__": 50
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -710,32 +800,26 @@ ...@@ -710,32 +800,26 @@
"_name": "ProgressBar", "_name": "ProgressBar",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 14 "__id__": 17
}, },
"_children": [ "_children": [
{ {
"__id__": 16 "__id__": 19
},
{
"__id__": 21
}, },
{ {
"__id__": 27 "__id__": 24
}, },
{ {
"__id__": 33 "__id__": 31
}, },
{ {
"__id__": 39 "__id__": 38
}, },
{ {
"__id__": 42 "__id__": 42
}, },
{ {
"__id__": 44 "__id__": 45
},
{
"__id__": 46
} }
], ],
"_active": true, "_active": true,
...@@ -745,9 +829,6 @@ ...@@ -745,9 +829,6 @@
}, },
{ {
"__id__": 49 "__id__": 49
},
{
"__id__": 50
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -773,7 +854,7 @@ ...@@ -773,7 +854,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
65.208, 65.20799999999997,
-580.635, -580.635,
0, 0,
0, 0,
...@@ -803,17 +884,20 @@ ...@@ -803,17 +884,20 @@
"_name": "bar", "_name": "bar",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 15 "__id__": 18
}, },
"_children": [ "_children": [
{ {
"__id__": 17 "__id__": 20
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 20 "__id__": 22
},
{
"__id__": 23
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -827,7 +911,7 @@ ...@@ -827,7 +911,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 220, "width": 10,
"height": 42 "height": 42
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -839,7 +923,7 @@ ...@@ -839,7 +923,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-1016.834, 0,
14.556, 14.556,
0, 0,
0, 0,
...@@ -869,16 +953,13 @@ ...@@ -869,16 +953,13 @@
"_name": "bar_tag", "_name": "bar_tag",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 16 "__id__": 19
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 18 "__id__": 21
},
{
"__id__": 19
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -904,7 +985,7 @@ ...@@ -904,7 +985,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
243.28000000000003, 38.399000000000015,
-9.002, -9.002,
0, 0,
0, 0,
...@@ -934,7 +1015,7 @@ ...@@ -934,7 +1015,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 17 "__id__": 20
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -961,39 +1042,12 @@ ...@@ -961,39 +1042,12 @@
"_atlas": null, "_atlas": null,
"_id": "42AYfV7WRL06RjstJcX2QQ" "_id": "42AYfV7WRL06RjstJcX2QQ"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": -99.78000000000003,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c7R/FpdJRMBbiA2IUg5hOn"
},
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 16 "__id__": 19
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1020,22 +1074,52 @@ ...@@ -1020,22 +1074,52 @@
"_atlas": null, "_atlas": null,
"_id": "6aEBayL25NCYjiR2AaURHr" "_id": "6aEBayL25NCYjiR2AaURHr"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 0,
"_left": 14.937999999999988,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "7310XIrRBLaaz4w9xVlqLd"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "Play", "_name": "Play",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 15 "__id__": 18
}, },
"_children": [ "_children": [
{ {
"__id__": 22 "__id__": 25
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 25 "__id__": 28
},
{
"__id__": 30
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1091,16 +1175,16 @@ ...@@ -1091,16 +1175,16 @@
"_name": "Background", "_name": "Background",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 21 "__id__": 24
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 23 "__id__": 26
}, },
{ {
"__id__": 24 "__id__": 27
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1156,7 +1240,7 @@ ...@@ -1156,7 +1240,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 22 "__id__": 25
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1188,7 +1272,7 @@ ...@@ -1188,7 +1272,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 22 "__id__": 25
}, },
"_enabled": true, "_enabled": true,
"alignMode": 0, "alignMode": 0,
...@@ -1215,7 +1299,7 @@ ...@@ -1215,7 +1299,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 21 "__id__": 24
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -1224,7 +1308,7 @@ ...@@ -1224,7 +1308,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 26 "__id__": 29
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -1290,7 +1374,7 @@ ...@@ -1290,7 +1374,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
}, },
"_N$target": { "_N$target": {
"__id__": 22 "__id__": 25
}, },
"_id": "a8bWaLdnFKA5ITxJunB2R2" "_id": "a8bWaLdnFKA5ITxJunB2R2"
}, },
...@@ -1304,22 +1388,52 @@ ...@@ -1304,22 +1388,52 @@
"handler": "play", "handler": "play",
"customEventData": "" "customEventData": ""
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": -256,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "a0Wqj/VOxJSbxEOgQXycLF"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "Pause", "_name": "Pause",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 15 "__id__": 18
}, },
"_children": [ "_children": [
{ {
"__id__": 28 "__id__": 32
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 31 "__id__": 35
},
{
"__id__": 37
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1375,16 +1489,16 @@ ...@@ -1375,16 +1489,16 @@
"_name": "Background", "_name": "Background",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 27 "__id__": 31
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 29 "__id__": 33
}, },
{ {
"__id__": 30 "__id__": 34
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1440,7 +1554,7 @@ ...@@ -1440,7 +1554,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 28 "__id__": 32
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1472,7 +1586,7 @@ ...@@ -1472,7 +1586,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 28 "__id__": 32
}, },
"_enabled": true, "_enabled": true,
"alignMode": 0, "alignMode": 0,
...@@ -1499,7 +1613,7 @@ ...@@ -1499,7 +1613,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 27 "__id__": 31
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -1508,7 +1622,7 @@ ...@@ -1508,7 +1622,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 32 "__id__": 36
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -1564,7 +1678,7 @@ ...@@ -1564,7 +1678,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 28 "__id__": 32
}, },
"_id": "94dhG7VhpIZZJp5e+IJuYc" "_id": "94dhG7VhpIZZJp5e+IJuYc"
}, },
...@@ -1579,180 +1693,17 @@ ...@@ -1579,180 +1693,17 @@
"customEventData": "" "customEventData": ""
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Widget",
"_name": "Restart", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "node": {
"__id__": 15 "__id__": 31
},
"_children": [
{
"__id__": 34
}
],
"_active": false,
"_components": [
{
"__id__": 37
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 209,
"height": 218
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-1180,
16,
0,
0,
0,
0,
1,
1,
1,
0.5
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "83UkubGDZH6akdMnNGsdIv"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 33
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 35
},
{
"__id__": 36
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 209,
"height": 218
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
0
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "00flnBd/hAfrsdRlgcikeq"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "16ea0a4c-9fd6-4334-8f5a-56b9ec1673f8"
},
"_type": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "87Yjum3U1A8oQ+vRmXHXQx"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
}, },
"_enabled": true, "_enabled": true,
"alignMode": 0, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 45, "_alignFlags": 8,
"_left": 0, "_left": -256,
"_right": 0, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": 0, "_bottom": 0,
...@@ -1764,104 +1715,23 @@ ...@@ -1764,104 +1715,23 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 100, "_originalWidth": 0,
"_originalHeight": 40, "_originalHeight": 0,
"_id": "9btc+EKnVIM5/9Qu2GtB38" "_id": "63E/r5Pw5MfYZmJfXTJ6bG"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 38
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 3,
"transition": 3,
"_N$normalColor": {
"__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,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 34
},
"_id": "edfm8dGPlEE5rKXtLAJz10"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "280c3rsZJJKnZ9RqbALVwtK",
"handler": "pause",
"customEventData": ""
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "CurrentLabel", "_name": "CurrentLabel",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 15 "__id__": 18
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 39
},
{ {
"__id__": 40 "__id__": 40
}, },
...@@ -1922,7 +1792,7 @@ ...@@ -1922,7 +1792,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 39 "__id__": 38
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1955,7 +1825,7 @@ ...@@ -1955,7 +1825,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 39 "__id__": 38
}, },
"_enabled": false, "_enabled": false,
"_color": { "_color": {
...@@ -1969,112 +1839,47 @@ ...@@ -1969,112 +1839,47 @@
"_id": "eahGxjR3VJXJU5Vhkwp4DB" "_id": "eahGxjR3VJXJU5Vhkwp4DB"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Widget",
"_name": "line",
"_objFlags": 0,
"_parent": {
"__id__": 15
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 43
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 5.56,
"height": 27.72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
391.962,
2.246,
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": "06dHxapIZKqacYzXLB/bRA"
},
{
"__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 42 "__id__": 38
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "alignMode": 1,
{ "_target": null,
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" "_alignFlags": 8,
} "_left": 0.30600000000004,
], "_right": 0,
"_srcBlendFactor": 770, "_top": 0,
"_dstBlendFactor": 771, "_bottom": 0,
"_string": "/", "_verticalCenter": 0,
"_N$string": "/", "_horizontalCenter": 0,
"_fontSize": 20, "_isAbsLeft": true,
"_lineHeight": 22, "_isAbsRight": true,
"_enableWrapText": true, "_isAbsTop": true,
"_N$file": null, "_isAbsBottom": true,
"_isSystemFontUsed": true, "_isAbsHorizontalCenter": true,
"_spacingX": 0, "_isAbsVerticalCenter": true,
"_batchAsBitmap": false, "_originalWidth": 0,
"_styleFlags": 0, "_originalHeight": 0,
"_underlineHeight": 0, "_id": "61gB9uattNRoc2heW/lvn5"
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "d7oat5Z5hGfblknD9KVvEi"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "TimeLabel", "_name": "TimeLabel",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 15 "__id__": 18
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 45 "__id__": 43
},
{
"__id__": 44
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2130,7 +1935,7 @@ ...@@ -2130,7 +1935,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 44 "__id__": 42
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2158,16 +1963,46 @@ ...@@ -2158,16 +1963,46 @@
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "18+R48nStLcZeo+SIuNJL4" "_id": "18+R48nStLcZeo+SIuNJL4"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": 23.77800000000002,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "eaEgqRSfZHC4HlsZG+u5Ih"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "text_tips_left", "_name": "text_tips_left",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 15 "__id__": 18
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 46
},
{ {
"__id__": 47 "__id__": 47
} }
...@@ -2225,7 +2060,7 @@ ...@@ -2225,7 +2060,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 46 "__id__": 45
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2252,12 +2087,39 @@ ...@@ -2252,12 +2087,39 @@
"_atlas": null, "_atlas": null,
"_id": "d1UcG/hPVCMr/y0GjrJIGW" "_id": "d1UcG/hPVCMr/y0GjrJIGW"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 12,
"_left": -194.52999999999997,
"_right": 0,
"_top": 0,
"_bottom": 176.52800000000002,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "dcC8aY8k9PPq4/Ajh4rOUP"
},
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 15 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2284,36 +2146,19 @@ ...@@ -2284,36 +2146,19 @@
"_atlas": null, "_atlas": null,
"_id": "70MH/+uAVLfpCHqg4yKrpK" "_id": "70MH/+uAVLfpCHqg4yKrpK"
}, },
{
"__type__": "cc.ProgressBar",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"_N$totalLength": 880,
"_N$barSprite": {
"__id__": 20
},
"_N$mode": 0,
"_N$progress": 0,
"_N$reverse": false,
"_id": "862tmetjRItLZQqs3ZtqeQ"
},
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 15 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 4, "_alignFlags": 44,
"_left": 0, "_left": -963.292,
"_right": 0, "_right": -1093.708,
"_top": 0, "_top": 0,
"_bottom": -629.635, "_bottom": -629.635,
"_verticalCenter": 0, "_verticalCenter": 0,
...@@ -2324,7 +2169,7 @@ ...@@ -2324,7 +2169,7 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 0, "_originalWidth": 2057,
"_originalHeight": 0, "_originalHeight": 0,
"_id": "70m+PVzhhBpKXNmtdvKZ+d" "_id": "70m+PVzhhBpKXNmtdvKZ+d"
}, },
...@@ -2333,16 +2178,16 @@ ...@@ -2333,16 +2178,16 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 14 "__id__": 17
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 0, "_alignFlags": 44,
"_left": 0, "_left": 640,
"_right": 0, "_right": 640,
"_top": 0, "_top": 0,
"_bottom": 31.42500000000001, "_bottom": 360,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
...@@ -2408,31 +2253,31 @@ ...@@ -2408,31 +2253,31 @@
}, },
"_enabled": true, "_enabled": true,
"videoPlayer": { "videoPlayer": {
"__id__": 13 "__id__": 15
}, },
"ProgressBar": { "ProgressBar": {
"__id__": 49 "__id__": 18
}, },
"playButton": { "playButton": {
"__id__": 25 "__id__": 28
}, },
"pauseButton": { "pauseButton": {
"__id__": 31 "__id__": 35
}, },
"restartButton": null, "restartButton": null,
"backButton": null, "backButton": null,
"forwardButton": null, "forwardButton": null,
"durationLabel": { "durationLabel": {
"__id__": 45 "__id__": 43
}, },
"currentTimeLabel": { "currentTimeLabel": {
"__id__": 40 "__id__": 39
}, },
"barTag": { "barTag": {
"__id__": 17 "__id__": 20
}, },
"bar": { "bar": {
"__id__": 16 "__id__": 19
}, },
"_id": "ec0d87qy5Eoavi5EqUiZj3" "_id": "ec0d87qy5Eoavi5EqUiZj3"
} }
......
...@@ -10,7 +10,7 @@ cc.Class({ ...@@ -10,7 +10,7 @@ cc.Class({
}, },
ProgressBar: { ProgressBar: {
default: null, default: null,
type: cc.ProgressBar type: cc.Node
}, },
playButton: { playButton: {
default: null, default: null,
...@@ -145,17 +145,14 @@ cc.Class({ ...@@ -145,17 +145,14 @@ cc.Class({
this.initdDrag(); this.initdDrag();
}, },
async initBg() {
const bgNode = cc.find('Canvas/bg');
bgNode.scale = this._mapScaleMax;
},
initListener() { initListener() {
}, },
initdDrag() { initdDrag() {
const maxX = this.ProgressBar.node.width; const maxX = this.ProgressBar.width;
const minX = 0; const minX = 0;
this.barTag.off(cc.Node.EventType.TOUCH_START); this.barTag.off(cc.Node.EventType.TOUCH_START);
this.barTag.on(cc.Node.EventType.TOUCH_START, (e) => { this.barTag.on(cc.Node.EventType.TOUCH_START, (e) => {
console.log("TOUCH_START"); console.log("TOUCH_START");
...@@ -198,10 +195,10 @@ cc.Class({ ...@@ -198,10 +195,10 @@ cc.Class({
this.updateBarByPos(this.barTag.x); this.updateBarByPos(this.barTag.x);
this.triggerInteractive() this.triggerInteractive()
}); });
this.ProgressBar.node.off(cc.Node.EventType.TOUCH_START); this.ProgressBar.off(cc.Node.EventType.TOUCH_START);
this.ProgressBar.node.on(cc.Node.EventType.TOUCH_START, (e) => { this.ProgressBar.on(cc.Node.EventType.TOUCH_START, (e) => {
const pos = e.getLocation(); const pos = e.getLocation();
const pPos = this.ProgressBar.node.convertToNodeSpaceAR(pos); const pPos = this.ProgressBar.convertToNodeSpaceAR(pos);
const newX = Math.min(maxX, Math.max(pPos.x, minX)); const newX = Math.min(maxX, Math.max(pPos.x, minX));
this.updateBarByPos(newX); this.updateBarByPos(newX);
// console.log("ProgressBar TOUCH_START", newX); // console.log("ProgressBar TOUCH_START", newX);
...@@ -211,7 +208,7 @@ cc.Class({ ...@@ -211,7 +208,7 @@ cc.Class({
console.log("screen TOUCH_START"); console.log("screen TOUCH_START");
this.triggerInteractive() this.triggerInteractive()
}); });
const pgBar = this.ProgressBar.node; const pgBar = this.ProgressBar;
this.tw = new (function(){ this.tw = new (function(){
this._tw = cc.tween(pgBar).delay(3).to(.6, { this._tw = cc.tween(pgBar).delay(3).to(.6, {
opacity: 255 opacity: 255
...@@ -238,17 +235,8 @@ cc.Class({ ...@@ -238,17 +235,8 @@ cc.Class({
pgBar.opacity = 255; pgBar.opacity = 255;
} }
}); });
// this.tw = cc.tween(this.ProgressBar.node).delay(3).to(.6, {
// opacity: 0
// }).call(() => {
// console.log('This is a callback');
// // this.tw.stop();
// // this.tw.removeSelf()
// // this.tw = null;
// })
}, },
async initView() { async initView() {
await this.initBg();
this.initListener(); this.initListener();
}, },
...@@ -276,7 +264,7 @@ cc.Class({ ...@@ -276,7 +264,7 @@ cc.Class({
}, },
triggerInteractive() { triggerInteractive() {
this.tw.stop(); this.tw.stop();
this.ProgressBar.node.opacity = 255; this.ProgressBar.opacity = 255;
this.tw.start(); this.tw.start();
}, },
checkProgressBarStatus() { checkProgressBarStatus() {
...@@ -286,11 +274,11 @@ cc.Class({ ...@@ -286,11 +274,11 @@ cc.Class({
} }
} else { } else {
this.tw.stop(); this.tw.stop();
this.ProgressBar.node.opacity = 255 this.ProgressBar.opacity = 255
} }
}, },
updateBarByPos(newX) { updateBarByPos(newX) {
const maxX = this.ProgressBar.node.width; const maxX = this.ProgressBar.width;
const minX = 0; const minX = 0;
const percent = newX / maxX; const percent = newX / maxX;
...@@ -299,16 +287,16 @@ cc.Class({ ...@@ -299,16 +287,16 @@ cc.Class({
this.videoPlayer.currentTime = percent * dur this.videoPlayer.currentTime = percent * dur
}, },
updateBarByTime(ct){ updateBarByTime(ct){
this.currentTimeLabel.string = this.formatTime(ct); this.currentTimeLabel.string = this.formatTime(ct);
const dur = this.videoPlayer.getDuration(); const dur = this.videoPlayer.getDuration();
const percent = ct / dur; const percent = ct / dur;
const maxX = this.ProgressBar.node.width-20; const maxX = this.ProgressBar.width-20;
const minX = 0; const minX = 0;
let newX = percent * maxX; let newX = percent * maxX;
newX = Math.min(maxX, Math.max(newX, minX)); newX = Math.min(maxX, Math.max(newX, minX));
this.barTag.x = newX; this.barTag.x = newX;
this.bar.width = newX; this.bar.width = newX;
this.bar.x = 0 - (maxX / 2);
}, },
formatTime(time) { formatTime(time) {
if (time === undefined) { if (time === undefined) {
......
// {"imgAni":{"ske":{"url":"https://teach.cdn.ireadabc.com/e13afca23d37ba33489c0aaa61a515f5.json","name":"川阅阅_ske.json"},"tex":{"url":"https://teach.cdn.ireadabc.com/7afcddbb7f0127613059e574638a9f3e.json","name":"川阅阅_tex.json"},"png":{"url":"https://teach.cdn.ireadabc.com/63699fcef6053eef4f58b89dad35af0b.png","name":"川阅阅_tex.png"}},"tipSwitch":"1","tipType":"page","tipBg":"https://teach.cdn.ireadabc.com/4516be9212c58098c8eebbd7021c8c2a.png","tipPage":[{"title":"这么小的院子里,居然同时有一间书房和一间书院,这家人可真喜欢读书啊。","audio":"https://staging-teach.cdn.ireadabc.com/c03129693e6cabf061661fba349fa031.mp3"}],"title":"","audio":"","audioName":"","image":"https://teach.cdn.ireadabc.com/efa8d5d75d18379dcac9ee885d6f2980.png","endImgAni":{"ske":{"url":"https://teach.cdn.ireadabc.com/8a5825bc51a32f13ddb55d3065d713a9.json","name":"动画用图川阅阅奖励_ske.json"},"tex":{"url":"https://teach.cdn.ireadabc.com/c4f5e10343ab1e79eb7407867fc4a85b.json","name":"动画用图川阅阅奖励_tex.json"},"png":{"url":"https://teach.cdn.ireadabc.com/bc984a44b7537f051707f662fba3943e.png","name":"动画用图川阅阅奖励_tex.png"}},"endImgTitle":"棒棒的!","points":"","tips":"匾额写的是这间屋子的名字或屋子最主要的功能","questionScore":"15","video_url":""}
export const defaultData = { export const defaultData = {
......
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