Commit 4846780e authored by 曲世俊's avatar 曲世俊

-- feat cookie

parent e3aecb8f
......@@ -21,13 +21,13 @@
"__id__": 2
},
{
"__id__": 6
"__id__": 5
},
{
"__id__": 30
"__id__": 9
},
{
"__id__": 37
"__id__": 33
},
{
"__id__": 40
......@@ -45,23 +45,29 @@
"__id__": 171
},
{
"__id__": 175
"__id__": 177
},
{
"__id__": 178
"__id__": 183
},
{
"__id__": 187
},
{
"__id__": 190
}
],
"_active": true,
"_components": [
{
"__id__": 181
"__id__": 193
},
{
"__id__": 182
"__id__": 194
}
],
"_prefab": {
"__id__": 183
"__id__": 195
},
"_opacity": 255,
"_color": {
......@@ -112,7 +118,7 @@
},
{
"__type__": "cc.Node",
"_name": "bgwhite",
"_name": "VideoNode",
"_objFlags": 0,
"_parent": {
"__id__": 1
......@@ -122,13 +128,108 @@
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 870,
"height": 542
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-5000,
-5001.455,
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": ""
},
{
"__type__": "cc.VideoPlayer",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_resourceType": 0,
"_remoteURL": "",
"_clip": null,
"_volume": 1,
"_mute": false,
"_isFullscreen": false,
"_N$isFullscreen": false,
"_stayOnBottom": false,
"videoPlayerEvent": [],
"_N$keepAspectRatio": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59286199-6a11-47ed-8d48-f792c3448a8f"
},
"fileId": "d3rbXGs8FEObzNml95Abho",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "bgwhite",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
},
{
"__id__": 4
"__id__": 7
}
],
"_prefab": {
"__id__": 5
"__id__": 8
},
"_opacity": 255,
"_color": {
......@@ -182,7 +283,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
"__id__": 5
},
"_enabled": true,
"_materials": [
......@@ -214,7 +315,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
"__id__": 5
},
"_enabled": true,
"alignMode": 1,
......@@ -256,23 +357,23 @@
},
"_children": [
{
"__id__": 7
"__id__": 10
},
{
"__id__": 22
"__id__": 25
}
],
"_active": true,
"_components": [
{
"__id__": 27
"__id__": 30
},
{
"__id__": 28
"__id__": 31
}
],
"_prefab": {
"__id__": 29
"__id__": 32
},
"_opacity": 255,
"_color": {
......@@ -326,27 +427,27 @@
"_name": "bgNode",
"_objFlags": 0,
"_parent": {
"__id__": 6
"__id__": 9
},
"_children": [
{
"__id__": 8
"__id__": 11
},
{
"__id__": 12
"__id__": 15
},
{
"__id__": 16
"__id__": 19
}
],
"_active": true,
"_components": [
{
"__id__": 20
"__id__": 23
}
],
"_prefab": {
"__id__": 21
"__id__": 24
},
"_opacity": 255,
"_color": {
......@@ -400,20 +501,20 @@
"_name": "bg_bottom",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 10
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
"__id__": 12
},
{
"__id__": 10
"__id__": 13
}
],
"_prefab": {
"__id__": 11
"__id__": 14
},
"_opacity": 255,
"_color": {
......@@ -467,7 +568,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 11
},
"_enabled": true,
"_materials": [
......@@ -499,7 +600,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 11
},
"_enabled": true,
"alignMode": 1,
......@@ -537,20 +638,20 @@
"_name": "bg_left",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 10
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
"__id__": 16
},
{
"__id__": 14
"__id__": 17
}
],
"_prefab": {
"__id__": 15
"__id__": 18
},
"_opacity": 255,
"_color": {
......@@ -604,7 +705,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
"__id__": 15
},
"_enabled": true,
"_materials": [
......@@ -636,7 +737,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
"__id__": 15
},
"_enabled": true,
"alignMode": 1,
......@@ -674,20 +775,20 @@
"_name": "bg_right",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 10
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 17
"__id__": 20
},
{
"__id__": 18
"__id__": 21
}
],
"_prefab": {
"__id__": 19
"__id__": 22
},
"_opacity": 255,
"_color": {
......@@ -741,7 +842,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
"__id__": 19
},
"_enabled": true,
"_materials": [
......@@ -773,7 +874,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
"__id__": 19
},
"_enabled": true,
"alignMode": 1,
......@@ -811,7 +912,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
"__id__": 10
},
"_enabled": true,
"alignMode": 1,
......@@ -849,17 +950,17 @@
"_name": "videoBg",
"_objFlags": 0,
"_parent": {
"__id__": 6
"__id__": 9
},
"_children": [
{
"__id__": 23
"__id__": 26
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 26
"__id__": 29
},
"_opacity": 255,
"_color": {
......@@ -913,17 +1014,17 @@
"_name": "bg_video_bottom",
"_objFlags": 0,
"_parent": {
"__id__": 22
"__id__": 25
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 24
"__id__": 27
}
],
"_prefab": {
"__id__": 25
"__id__": 28
},
"_opacity": 255,
"_color": {
......@@ -977,7 +1078,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 26
},
"_enabled": true,
"_materials": [
......@@ -1031,7 +1132,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
"__id__": 9
},
"_enabled": true,
"_materials": [
......@@ -1063,7 +1164,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
"__id__": 9
},
"_enabled": true,
"alignMode": 1,
......@@ -1105,17 +1206,17 @@
},
"_children": [
{
"__id__": 31
"__id__": 34
}
],
"_active": true,
"_components": [
{
"__id__": 35
"__id__": 38
}
],
"_prefab": {
"__id__": 36
"__id__": 39
},
"_opacity": 255,
"_color": {
......@@ -1169,20 +1270,20 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 30
"__id__": 33
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 32
"__id__": 35
},
{
"__id__": 33
"__id__": 36
}
],
"_prefab": {
"__id__": 34
"__id__": 37
},
"_opacity": 255,
"_color": {
......@@ -1236,7 +1337,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 34
},
"_enabled": true,
"_materials": [
......@@ -1268,7 +1369,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 34
},
"_enabled": true,
"alignMode": 1,
......@@ -1306,7 +1407,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
"__id__": 33
},
"_enabled": true,
"_materials": [
......@@ -1334,20 +1435,27 @@
},
{
"__type__": "cc.Node",
"_name": "VideoNode",
"_name": "bg_video_shadow",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_children": [
{
"__id__": 41
},
{
"__id__": 45
}
],
"_active": true,
"_components": [
{
"__id__": 38
"__id__": 49
}
],
"_prefab": {
"__id__": 39
"__id__": 50
},
"_opacity": 255,
"_color": {
......@@ -1359,8 +1467,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 870,
"height": 542
"width": 1320,
"height": 776
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1371,8 +1479,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-5000,
-5001.455,
-0.2370000000000001,
162.871,
0,
0,
0,
......@@ -1396,60 +1504,25 @@
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.VideoPlayer",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
},
"_enabled": true,
"_resourceType": 0,
"_remoteURL": "",
"_clip": null,
"_volume": 1,
"_mute": false,
"_isFullscreen": false,
"_N$isFullscreen": false,
"_stayOnBottom": false,
"videoPlayerEvent": [],
"_N$keepAspectRatio": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59286199-6a11-47ed-8d48-f792c3448a8f"
},
"fileId": "d3rbXGs8FEObzNml95Abho",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "bg_video_shadow",
"_name": "empty_white",
"_objFlags": 0,
"_parent": {
"__id__": 1
"__id__": 40
},
"_children": [
{
"__id__": 41
},
{
"__id__": 45
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 49
"__id__": 42
},
{
"__id__": 43
}
],
"_prefab": {
"__id__": 50
"__id__": 44
},
"_opacity": 255,
"_color": {
......@@ -1461,8 +1534,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1320,
"height": 776
"width": 870,
"height": 542
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1473,8 +1546,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-0.2370000000000001,
162.871,
-4.924000000000035,
14.865000000000009,
0,
0,
0,
......@@ -1499,78 +1572,11 @@
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "empty_white",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"_parent": {
"__id__": 40
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
},
{
"__id__": 43
}
],
"_prefab": {
"__id__": 44
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 870,
"height": 542
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-4.924000000000035,
14.865000000000009,
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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"node": {
"__id__": 41
},
"_enabled": true,
"_materials": [
......@@ -6223,7 +6229,7 @@
},
{
"__type__": "cc.Node",
"_name": "title",
"_name": "btn_last",
"_objFlags": 0,
"_parent": {
"__id__": 1
......@@ -6236,10 +6242,458 @@
},
{
"__id__": 173
},
{
"__id__": 175
}
],
"_prefab": {
"__id__": 174
"__id__": 176
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 103,
"height": 103
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-658.265,
96.45499999999998,
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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 171
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d0893e19-3900-461f-b09e-ecc435b815ba"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 171
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 174
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_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__": 171
},
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "ed52etj/IVPVbX5tWqr/3nP",
"handler": "onClickLast",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 171
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 250.235,
"_right": 0,
"_top": 392.045,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59286199-6a11-47ed-8d48-f792c3448a8f"
},
"fileId": "30UDwu0JhPXaTqbXdhGHAO",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "btn_next",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 178
},
{
"__id__": 179
},
{
"__id__": 181
}
],
"_prefab": {
"__id__": 182
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 103,
"height": 103
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
672.4639999999999,
96.45499999999998,
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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 177
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "c528c2a2-e7b9-4f8b-9cd2-5cdd956ae9c0"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 177
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 180
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_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__": 177
},
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "ed52etj/IVPVbX5tWqr/3nP",
"handler": "onClickNext",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 177
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 1580.964,
"_right": 0,
"_top": 392.045,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59286199-6a11-47ed-8d48-f792c3448a8f"
},
"fileId": "37SRr8fw1Mwr2V/b0ZWnoj",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 184
},
{
"__id__": 185
}
],
"_prefab": {
"__id__": 186
},
"_opacity": 255,
"_color": {
......@@ -6293,7 +6747,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 171
"__id__": 183
},
"_enabled": true,
"_materials": [
......@@ -6328,7 +6782,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 171
"__id__": 183
},
"_enabled": true,
"alignMode": 1,
......@@ -6372,11 +6826,11 @@
"_active": false,
"_components": [
{
"__id__": 176
"__id__": 188
}
],
"_prefab": {
"__id__": 177
"__id__": 189
},
"_opacity": 255,
"_color": {
......@@ -6430,7 +6884,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 175
"__id__": 187
},
"_enabled": true,
"_materials": [
......@@ -6479,11 +6933,11 @@
"_active": false,
"_components": [
{
"__id__": 179
"__id__": 191
}
],
"_prefab": {
"__id__": 180
"__id__": 192
},
"_opacity": 255,
"_color": {
......@@ -6537,7 +6991,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 178
"__id__": 190
},
"_enabled": true,
"_materials": [
......@@ -6619,7 +7073,7 @@
},
"_enabled": true,
"videoPlayer": {
"__id__": 38
"__id__": 3
},
"ProgressBar": {
"__id__": 55
......@@ -6648,7 +7102,7 @@
"__id__": 56
},
"loadingSprite": {
"__id__": 178
"__id__": 190
},
"_id": ""
},
......
......@@ -140,6 +140,16 @@ export default class VideoPlayerComponent extends cc.Component {
cc.find('JJ_Video_01/bg').scale = this._mapScaleMax;
cc.find('JJ_Video_01/video_node/bg').scale = this._mapScaleMax;
// cc.find('JJ_Video_01/bgwhite').zIndex=-2
// cc.find('JJ_Video_01/bg').zIndex=-1
// cc.find('JJ_Video_01/VideoNode').zIndex=0
// cc.find('JJ_Video_01/video_node').zIndex=1
// cc.find('JJ_Video_01/bg_video_shadow').zIndex=2
// cc.find('JJ_Video_01/Controls').zIndex=3
// cc.find('JJ_Video_01/videolist').zIndex=4
// cc.find('JJ_Video_01/btn_return').zIndex=5
// cc.find('JJ_Video_01/title').zIndex=5
this._isReadyToPlay = false;
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
......@@ -232,6 +242,33 @@ export default class VideoPlayerComponent extends cc.Component {
});
this.initdDrag();
this.videoPlayIndex=0
this.refreshLastNextBtns()
}
refreshLastNextBtns(){
cc.find("JJ_Video_01/btn_last").active=this.videoPlayIndex!=0
if (this.videoItemList)
cc.find("JJ_Video_01/btn_next").active=this.videoPlayIndex!=this.videoItemList.length-1
}
onClickNext(){
const nextItem = this.videoItemList[this.videoPlayIndex + 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
this.refreshLastNextBtns()
}
onClickLast(){
const nextItem = this.videoItemList[this.videoPlayIndex - 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
this.refreshLastNextBtns()
}
initListener() {
......@@ -388,6 +425,7 @@ export default class VideoPlayerComponent extends cc.Component {
} else {
this.data.totalCount = 1;
}
this.refreshLastNextBtns()
}
start() {
......@@ -404,6 +442,29 @@ export default class VideoPlayerComponent extends cc.Component {
if (window && window["air"]) {
window["air"].hideAirClassLoading();
}
cc.find(`JJ_Video_01/videolist`).active = this.data.dataArr.length>1;
if (this.data.dataArr.length<=1){
console.log("qsj???")
cc.find(`JJ_Video_01/bg/videoBg`).scale=1.2
cc.find(`JJ_Video_01/bg/videoBg`).y=-136.058
// cc.find(`JJ_Video_01/video_node`).scale=1.2
cc.find(`JJ_Video_01/video_node`).width*=1.2
cc.find(`JJ_Video_01/video_node`).height*=1.2
cc.find(`JJ_Video_01/video_node`).y=73.311
cc.find(`JJ_Video_01/bg_video_shadow`).scale=1.2
cc.find(`JJ_Video_01/bg_video_shadow`).y=59.039
cc.find(`JJ_Video_01/btn_last`).x=-734.101
cc.find(`JJ_Video_01/btn_last`).y=-39.603
cc.find(`JJ_Video_01/btn_next`).x=734.101
cc.find(`JJ_Video_01/btn_next`).y=-39.603
cc.find(`JJ_Video_01/VideoNode`).scale=1.2
cc.find(`JJ_Video_01/Controls`).scale=1.2
cc.find(`JJ_Video_01/Controls`).y=-570
cc.find(`JJ_Video_01/Controls`).x+=50
this.videoPlayIndex=0
this.videoItemList[0].emit('my_item_click');
}
});
if (window.CustomEvent) {
......@@ -548,7 +609,11 @@ export default class VideoPlayerComponent extends cc.Component {
const controlBg = cc.find(`bg_video_bottom`, controls);
this.tempPos.controlPos = { x: controls.x, y: controls.y };
controls.x = 300; // qsj
controls.y = 0 - this.node.height / 2-30;
if (this.data.dataArr.length<=1){
controls.y = 0 - this.node.height / 2-30;
} else {
controls.y = 0 - this.node.height / 2-30;
}
controlBg.opacity = 240;
controlBg.width = this.node.width;
......@@ -590,7 +655,7 @@ export default class VideoPlayerComponent extends cc.Component {
this.videoPlayer.node.x = videoContainer.x;
this.videoPlayer.node.y = videoContainer.y;
cc.find(`JJ_Video_01/videolist`).active = true;
cc.find(`JJ_Video_01/videolist`).active = this.data.dataArr.length>1;
const controls = cc.find(`JJ_Video_01/Controls`);
const controlBg = cc.find(`bg_video_bottom`, controls);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -113,7 +113,9 @@ export default class NewClass extends cc.Component {
itemNode.addComponent(cc.Button);
itemNode.on("click", () => {
global.middleLayer.backPageNode = this.node;
global.middleLayer.loadOnlineCourseWare(data.id);
global.middleLayer.loadOnlineCourseWare(data.id, null, (flag)=>{
this.node.active=!flag
});
})
itemArr.push(itemNode);
......
......@@ -129,7 +129,9 @@ export default class NewClass extends cc.Component {
itemNode.addComponent(cc.Button);
itemNode.on("click", () => {
global.middleLayer.backPageNode = this.node;
global.middleLayer.loadOnlineCourseWare(data.id);
global.middleLayer.loadOnlineCourseWare(data.id, null, (flag)=>{
this.node.active=!flag
});
})
itemArr.push(itemNode);
......
......@@ -113,7 +113,9 @@ export default class NewClass extends cc.Component {
itemNode.addComponent(cc.Button);
itemNode.on("click", async () => {
global.middleLayer.backPageNode = this.node;
global.middleLayer.loadOnlineCourseWare(data.id);
global.middleLayer.loadOnlineCourseWare(data.id, null, (flag)=>{
this.node.active=!flag
});
})
itemArr.push(itemNode);
......
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import { getSprNodeByUrl, setSprNodeMaxLen, asyncCallNetworkApiGet, asyncCallNetworkApiPost } from "./util";
const { ccclass, property } = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Node)
Viewer: cc.Node = null;
@property(cc.Node)
scrollView: cc.Node = null;
@property(cc.Node)
listItem: cc.Node = null;
@property(cc.Node)
loading: cc.Node = null;
@property(cc.Material)
gray:cc.Material = null;
data;
handleClickBackBtn() {
const vc = this.Viewer.getComponent("PageViewer");
vc.toView("UnitPage", "leftIn")
}
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
async start() {
this.loading.active = true;
await this.initData();
await this.getAndStoreSyllabusStatus();
await this.initView();
this.loading.active = false;
}
async initData() {
const {rows} = await asyncCallNetworkApiGet(`/api/syllabus/v1/list`, {pid: this.node['syllabus_pid']});
this.data = rows;
}
syllabusLockStatusStore = {}; // 课件是否解锁的存储对象 { 99343: 'locked', 19834: 'unlock' }
async getAndStoreSyllabusStatus() {
const syllabuses = this.data.map(item => item.id);
const {rows} = await asyncCallNetworkApiGet(`/api/kyxq/v1/user/syllabus/status`, {syllabuses: syllabuses.join(",")});
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
if (syllabuses.includes(row.id)) {
this.syllabusLockStatusStore[row.id] = row.unlock == 0 ? 'locked' : 'unlock';
}
}
}
async initView() {
this.initListView();
}
initListView() {
const svNode = this.scrollView;
const view = cc.find("view", svNode);
view.width = svNode.width;
view.height = svNode.height;
const itemArr = this.getItemArr(this.data);
const sv = svNode.getComponent(cc.ScrollView);
this.initScrollViewItem(sv, itemArr, 1);
}
getItemArr(dataArr) {
const itemArr = [];
for (let i = 0; i < dataArr.length; i++) {
const data = dataArr[i];
const itemNode = cc.instantiate(this.listItem);
// 前期测试,都放开成解锁状态
// const unLock = this.syllabusLockStatusStore[data.id]==='unlock';
const unLock = true;
if (i==0 && !unLock) {
// 如果第一个是未解锁的状态,需要上报一个解锁并且渲染成解锁的状态
asyncCallNetworkApiPost(`/api/kyxq/v1/user/unlock`, {syllabus_id: data.id}).then((res) => {
if (res.code != 200) {
global.middleLayer.showTips(`解锁失败`);
}
});
}
data.unLock = unLock;
itemNode['data'] = data;
cc.find("title_label", itemNode).getComponent(cc.Label).string = data.name;
cc.find("English_label", itemNode).getComponent(cc.Label).string = data.tag;
getSprNodeByUrl(data.cover, (spr) => {
const sprNode = spr.node;
const picLayer = cc.find("pic_layer", itemNode);
picLayer.addChild(sprNode);
setSprNodeMaxLen(sprNode, picLayer.width, picLayer.height, true);
if (unLock) {
cc.find(`icon_lock`, itemNode).active = false;
} else {
spr.setMaterial(0, this.gray);
}
itemNode.active = true;
});
itemArr.push(itemNode);
}
return itemArr;
}
cardClick(evt: cc.Event) {
const {id, unLock} = evt.currentTarget.data;
if (!unLock) {
global.middleLayer.showTips(`未解锁`);
return;
}
if ( global.middleLayer ) {
global.middleLayer.backPageNode = this.node;
// global.middleLayer.loadOnlineCourseWare(id);
global.middleLayer.loadOnlineCourseWare(20522);
}
}
initScrollViewItem(sv, itemArr, row = 1) {
sv.scrollToTop();
const content = sv.content;
content.width = sv.node.width;
content.height = sv.node.height;
content.removeAllChildren();
const tempH = content.height / row;
const disY = tempH * 0.95;
const baseY = (row - 1) * 0.5 * disY;
let rowCount = 0;
const disX = 40;
const baseX = itemArr[0].width / 2 * itemArr[0].scaleX + disX;
let colCount = 0;
let lastX = baseX;
for (let i = 0; i < itemArr.length; i++) {
const item = itemArr[i];
item.x = lastX + disX;
item.y = baseY - rowCount * disY;
lastX = item.x + item.width * item.scale;
content.addChild(itemArr[i]);
const tempW = Math.abs(item.x + disX + item.width / 2 * item.scale);
content.width = lastX - item.width / 2 * item.scaleX + disX * 2;
rowCount++;
if (rowCount >= row) {
rowCount = 0;
colCount++;
}
}
}
// update (dt) {}
}
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import { getSprNodeByUrl, setSprNodeMaxLen, asyncCallNetworkApiGet, asyncCallNetworkApiPost } from "./util";
const { ccclass, property } = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Node)
Viewer: cc.Node = null;
@property(cc.Node)
scrollView: cc.Node = null;
@property(cc.Node)
listItem: cc.Node = null;
@property(cc.Node)
loading: cc.Node = null;
@property(cc.Material)
gray:cc.Material = null;
data;
handleClickBackBtn() {
const vc = this.Viewer.getComponent("PageViewer");
vc.toView("UnitPage", "leftIn")
}
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
async start() {
this.loading.active = true;
await this.initData();
await this.getAndStoreSyllabusStatus();
await this.initView();
this.loading.active = false;
}
async initData() {
const {rows} = await asyncCallNetworkApiGet(`/api/syllabus/v1/list`, {pid: this.node['syllabus_pid']});
this.data = rows;
}
syllabusLockStatusStore = {}; // 课件是否解锁的存储对象 { 99343: 'locked', 19834: 'unlock' }
async getAndStoreSyllabusStatus() {
const syllabuses = this.data.map(item => item.id);
const {rows} = await asyncCallNetworkApiGet(`/api/kyxq/v1/user/syllabus/status`, {syllabuses: syllabuses.join(",")});
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
if (syllabuses.includes(row.id)) {
this.syllabusLockStatusStore[row.id] = row.unlock == 0 ? 'locked' : 'unlock';
}
}
}
async initView() {
this.initListView();
}
initListView() {
const svNode = this.scrollView;
const view = cc.find("view", svNode);
view.width = svNode.width;
view.height = svNode.height;
const itemArr = this.getItemArr(this.data);
const sv = svNode.getComponent(cc.ScrollView);
this.initScrollViewItem(sv, itemArr, 1);
}
getItemArr(dataArr) {
const itemArr = [];
for (let i = 0; i < dataArr.length; i++) {
const data = dataArr[i];
const itemNode = cc.instantiate(this.listItem);
// 前期测试,都放开成解锁状态
// const unLock = this.syllabusLockStatusStore[data.id]==='unlock';
const unLock = true;
if (i==0 && !unLock) {
// 如果第一个是未解锁的状态,需要上报一个解锁并且渲染成解锁的状态
asyncCallNetworkApiPost(`/api/kyxq/v1/user/unlock`, {syllabus_id: data.id}).then((res) => {
if (res.code != 200) {
global.middleLayer.showTips(`解锁失败`);
}
});
}
data.unLock = unLock;
itemNode['data'] = data;
cc.find("title_label", itemNode).getComponent(cc.Label).string = data.name;
cc.find("English_label", itemNode).getComponent(cc.Label).string = data.tag;
getSprNodeByUrl(data.cover, (spr) => {
const sprNode = spr.node;
const picLayer = cc.find("pic_layer", itemNode);
picLayer.addChild(sprNode);
setSprNodeMaxLen(sprNode, picLayer.width, picLayer.height, true);
if (unLock) {
cc.find(`icon_lock`, itemNode).active = false;
} else {
spr.setMaterial(0, this.gray);
}
itemNode.active = true;
});
itemArr.push(itemNode);
}
return itemArr;
}
cardClick(evt: cc.Event) {
const {id, unLock} = evt.currentTarget.data;
if (!unLock) {
global.middleLayer.showTips(`未解锁`);
return;
}
if ( global.middleLayer ) {
global.middleLayer.backPageNode = this.node;
// global.middleLayer.loadOnlineCourseWare(id);
global.middleLayer.loadOnlineCourseWare(20522, null, (flag)=>{
this.node.active=!flag
});
}
}
initScrollViewItem(sv, itemArr, row = 1) {
sv.scrollToTop();
const content = sv.content;
content.width = sv.node.width;
content.height = sv.node.height;
content.removeAllChildren();
const tempH = content.height / row;
const disY = tempH * 0.95;
const baseY = (row - 1) * 0.5 * disY;
let rowCount = 0;
const disX = 40;
const baseX = itemArr[0].width / 2 * itemArr[0].scaleX + disX;
let colCount = 0;
let lastX = baseX;
for (let i = 0; i < itemArr.length; i++) {
const item = itemArr[i];
item.x = lastX + disX;
item.y = baseY - rowCount * disY;
lastX = item.x + item.width * item.scale;
content.addChild(itemArr[i]);
const tempW = Math.abs(item.x + disX + item.width / 2 * item.scale);
content.width = lastX - item.width / 2 * item.scaleX + disX * 2;
rowCount++;
if (rowCount >= row) {
rowCount = 0;
colCount++;
}
}
}
// update (dt) {}
}
......@@ -146,7 +146,6 @@ export default class NewClass extends middleLayerBase {
backPageNode: cc.Node = null; // 从绘本里返回的界面
exitGame(data?, isLocalTemplate=false) {
console.log("qsj?????")
if (isLocalTemplate){
// 模板已经放到项目内
this.hideTemplateByName(data.templateName);
......@@ -192,7 +191,11 @@ console.log("qsj?????")
return;
}
// 庆祝画面
this.showFinish();
if (this.courseIndex < this.courses.length){
this.showFinish();
} else {
this.showAllFinish()
}
}
academyArray = []; // 关卡数组
......@@ -217,128 +220,87 @@ console.log("qsj?????")
async showGold(cb) {
console.log(' in showGold')
const goldAnim = cc.instantiate(cc.find('middleLayer/res/anim/gold_anim'));
const particleLayer = cc.find("middleLayer/particleLayer");
const goldAnim = cc.instantiate(cc.find('middleLayer/res/anim/finish1_ske'));
const finishLayer = cc.find("middleLayer/finishLayer");
goldAnim.active = true;
goldAnim.parent = particleLayer;
particleLayer.active = true;
appearAnim(particleLayer, 0.3);
goldAnim.parent = finishLayer;
finishLayer.active = true;
appearAnim(finishLayer, 0.3);
console.log('goldAnim: ', goldAnim);
await asyncPlayDragonBoneAnimation(goldAnim, 'three', 1, null);
await asyncPlayDragonBoneAnimation(goldAnim, 'newAnimation', 1, null);
disappearAnim(goldAnim, 1);
disappearAnim(particleLayer, 1, () => {
particleLayer.active = false;
disappearAnim(finishLayer, 1, () => {
finishLayer.active = false;
});
cb();
cb&&cb();
}
async showFinish() {
console.log(' in showFinish')
const finishAnim = cc.instantiate(cc.find('middleLayer/res/anim/kyxq_finish'));
const finishAnim = cc.instantiate(cc.find('middleLayer/res/anim/finish2_ske'));
finishAnim.active = true;
finishAnim.y = -100;
const finishLayer = cc.find("middleLayer/finishLayer")
finishLayer.addChild(finishAnim, 2);
finishLayer.active = true;
const bgFinish = getSprNode("bg_finish");
finishAnim.addChild(bgFinish);
await asyncPlayDragonBoneAnimation(finishAnim, 'newAnimation', 1, null);
const labelLayer = new cc.Node();
const replayBtn = cc.find('middleLayer/res/img/btn_replay');
replayBtn.parent=finishLayer
const labelNode = new cc.Node();
const label = labelNode.addComponent(cc.Label);
label.string = "恭喜你获得";
labelLayer.addChild(labelNode);
labelNode.anchorX = 0;
const labelIcon = getSprNode("icon_coin");
labelLayer.addChild(labelIcon);
labelIcon.y = 10;
labelIcon.anchorX = 0;
const nextBtn = cc.find('middleLayer/res/img/btn_next');
nextBtn.parent=finishLayer
const labelNode2 = new cc.Node();
const label2 = labelNode2.addComponent(cc.Label);
label2.string = `x ${this.golds?this.golds.total:0}`;
labelLayer.addChild(labelNode2);
labelNode2.anchorX = 0;
const hideFinish = ()=>{
nextBtn.parent=cc.find("middleLayer/res/img")
replayBtn.parent=cc.find("middleLayer/res/img")
finishLayer.removeChild(finishAnim);
finishLayer.active = false;
}
const distance = 10;
setTimeout(() => {
labelLayer.width = labelNode.width + labelIcon.width + labelNode2.width + distance * 2;
labelLayer.x = -labelLayer.width / 2;
labelIcon.x = distance + labelNode.width;
labelNode2.x = labelIcon.x + labelIcon.width + distance;
replayBtn.on('touchstart' , () =>{
console.log("replayBtn")
hideFinish();
this.loadOnlineCourseWare(this.courseItem.course_id, null, null);
})
}, 1);
nextBtn.on("touchstart", () => {
console.log("nextBtn")
hideFinish();
this.goNextCross();
})
}
bgFinish.addChild(labelLayer);
appearAnim(labelLayer, 0.3);
async showAllFinish() {
console.log(' in showAllFinish')
const finishAnim = cc.instantiate(cc.find('middleLayer/res/anim/allfinish_ske'));
finishAnim.active = true;
const finishLayer = cc.find("middleLayer/finishLayer")
const finishLayer = cc.find("middleLayer/finishLayer")
finishLayer.addChild(finishAnim, 2);
finishLayer.active = true;
finishLayer.active = true;
appearAnim(finishLayer, 0.3, () => {
playLocalAudio(`finish`);
});
console.log('finishAnim: ', finishAnim);
const finishLight = getSprNode('bg_finishlight');
finishLayer.addChild(finishLight);
const rotateAction = cc.repeatForever(cc.rotateBy(5, 360));
finishLight.runAction(rotateAction);
await asyncPlayDragonBoneAnimation(finishAnim, 'newAnimation', 1, null);
await asyncPlayDragonBoneAnimation(finishAnim, 'finish', 1, null);
const exitBtn = cc.find('middleLayer/res/img/btn_x');
exitBtn.parent=finishLayer
const replayBtn = getSprNode("btn_replay");
finishLayer.addChild(replayBtn);
replayBtn.x = -400;
replayBtn.y = -270;
const nextBtn = getSprNode("btn_next");
finishLayer.addChild(nextBtn);
nextBtn.x = -replayBtn.x;
nextBtn.y = replayBtn.y;
const xBtn = getSprNode("btn_x");
finishLayer.addChild(xBtn);
xBtn.x = 400;
xBtn.y = 270;
const hideFinish = ()=>{
finishLayer.removeChild(xBtn);
finishLayer.removeChild(nextBtn);
finishLayer.removeChild(replayBtn);
finishLayer.removeChild(finishLight);
exitBtn.parent=cc.find("middleLayer/res/img")\
finishLayer.removeChild(finishAnim);
finishLayer.active = false;
}
replayBtn.on('touchstart' , () =>{
hideFinish();
this.loadOnlineCourseWare(this.courseItem.course_id, null, null);
})
nextBtn.on("touchstart", () => {
exitBtn.on("touchstart", () => {
console.log("exitBtn")
hideFinish();
this.goNextCross();
this.exitGame()
})
xBtn.on("touchstart", () => {
hideFinish();
this.exitGame();
})
appearAnim(replayBtn);
appearAnim(nextBtn);
appearAnim(xBtn);
}
reWriteAir() {
......
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