Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xy_video
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
xy_video
Commits
3269a629
Commit
3269a629
authored
Aug 12, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 答题
parent
e309141a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1140 additions
and
1003 deletions
+1140
-1003
xy_video.fire
assets/xy_video/Scene/xy_video.fire
+460
-1001
xy_video.js
assets/xy_video/Scene/xy_video.js
+78
-2
util.js
assets/xy_video/Script/util.js
+593
-0
util.js.meta
assets/xy_video/Script/util.js.meta
+9
-0
No files found.
assets/xy_video/Scene/xy_video.fire
View file @
3269a629
...
@@ -87,22 +87,22 @@
...
@@ -87,22 +87,22 @@
"__id__": 14
"__id__": 14
},
},
{
{
"__id__": 4
9
"__id__": 4
3
},
},
{
{
"__id__": 6
8
"__id__": 6
2
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
90
"__id__":
84
},
},
{
{
"__id__":
91
"__id__":
85
},
},
{
{
"__id__":
92
"__id__":
86
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -660,7 +660,7 @@
...
@@ -660,7 +660,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 4
8
"__id__": 4
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -686,8 +686,8 @@
...
@@ -686,8 +686,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
20.366
,
-
95.263
,
-
549.94
,
-
447.873
,
0,
0,
0,
0,
0,
0,
...
@@ -732,22 +732,19 @@
...
@@ -732,22 +732,19 @@
"__id__": 33
"__id__": 33
},
},
{
{
"__id__": 39
"__id__": 36
},
{
"__id__": 42
},
},
{
{
"__id__":
44
"__id__":
38
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 4
6
"__id__": 4
0
},
},
{
{
"__id__": 4
7
"__id__": 4
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -773,8 +770,8 @@
...
@@ -773,8 +770,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-76.761
,
0
,
10
0,
0,
0,
0,
0,
0,
0,
0,
...
@@ -1580,20 +1577,19 @@
...
@@ -1580,20 +1577,19 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
Restart
",
"_name": "
CurrentLabel
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 15
"__id__": 15
},
},
"_children": [
"_children": [],
{
"__id__": 34
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 37
"__id__": 34
},
{
"__id__": 35
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1607,8 +1603,8 @@
...
@@ -1607,8 +1603,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
100
,
"width":
50.05
,
"height":
100
"height":
27.72
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1619,16 +1615,16 @@
...
@@ -1619,16 +1615,16 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
666.761
,
356.898
,
-65
,
2.284
,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0.5
,
1
,
0.5
,
1
,
0.5
1
]
]
},
},
"_eulerAngles": {
"_eulerAngles": {
...
@@ -1642,23 +1638,71 @@
...
@@ -1642,23 +1638,71 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "8etpDDZ0xMiLfP+78oHdso"
"_id": "2ceGM7dYZL3LFNvca9G3bi"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "00:00",
"_N$string": "00:00",
"_fontSize": 20,
"_lineHeight": 22,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "edsa4SQztGMLMoGYq8SxTg"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": false,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_width": 4,
"_id": "eahGxjR3VJXJU5Vhkwp4DB"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
Background
",
"_name": "
line
",
"_objFlags":
512
,
"_objFlags":
0
,
"_parent": {
"_parent": {
"__id__":
33
"__id__":
15
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 35
"__id__": 37
},
{
"__id__": 36
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1672,8 +1716,8 @@
...
@@ -1672,8 +1716,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
82
,
"width":
5.56
,
"height":
100
"height":
27.72
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1684,16 +1728,111 @@
...
@@ -1684,16 +1728,111 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
391.962,
2.246,
0,
0,
0,
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": "",
"_objFlags": 0,
"node": {
"__id__": 36
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "/",
"_N$string": "/",
"_fontSize": 20,
"_lineHeight": 22,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "d7oat5Z5hGfblknD9KVvEi"
},
{
"__type__": "cc.Node",
"_name": "TimeLabel",
"_objFlags": 0,
"_parent": {
"__id__": 15
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 102,
"g": 68,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50.05,
"height": 27.72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
427.963,
1.101,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0
1
]
]
},
},
"_eulerAngles": {
"_eulerAngles": {
...
@@ -1707,14 +1846,47 @@
...
@@ -1707,14 +1846,47 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "39R2+9g0VLbZdcNRjODztu"
"_id": "63yfXbjOhDO7OOI37AwRXW"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "00:00",
"_N$string": "00:00",
"_fontSize": 20,
"_lineHeight": 22,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "18+R48nStLcZeo+SIuNJL4"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
34
"__id__":
15
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1725,7 +1897,7 @@
...
@@ -1725,7 +1897,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
1017c4a2-9aba-4814-b242-afbcc4b55252
"
"__uuid__": "
c52f2bc8-8077-4245-a763-b4ea20884ec9
"
},
},
"_type": 1,
"_type": 1,
"_sizeMode": 0,
"_sizeMode": 0,
...
@@ -1739,473 +1911,14 @@
...
@@ -1739,473 +1911,14 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
90BBMuoJRKXJJYa/7UarWs
"
"_id": "
70MH/+uAVLfpCHqg4yKrpK
"
},
},
{
{
"__type__": "cc.
Widget
",
"__type__": "cc.
ProgressBar
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 34
"__id__": 15
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 45,
"_left": 9,
"_right": 9,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 40,
"_id": "b7AVjmMxRLdZe9M/6TMYjP"
},
{
"__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": 230,
"g": 230,
"b": 230,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"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": 120,
"g": 120,
"b": 120,
"a": 200
},
"_N$normalSprite": null,
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 34
},
"_id": "758gmS/0tPWZRctPJr9k2+"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "280c3rsZJJKnZ9RqbALVwtK",
"handler": "replay",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "CurrentLabel",
"_objFlags": 0,
"_parent": {
"__id__": 15
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
},
{
"__id__": 41
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50.05,
"height": 27.72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
356.898,
2.284,
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": "2ceGM7dYZL3LFNvca9G3bi"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "00:00",
"_N$string": "00:00",
"_fontSize": 20,
"_lineHeight": 22,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "edsa4SQztGMLMoGYq8SxTg"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
},
"_enabled": false,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_width": 4,
"_id": "eahGxjR3VJXJU5Vhkwp4DB"
},
{
"__type__": "cc.Node",
"_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": "",
"_objFlags": 0,
"node": {
"__id__": 42
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "/",
"_N$string": "/",
"_fontSize": 20,
"_lineHeight": 22,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "d7oat5Z5hGfblknD9KVvEi"
},
{
"__type__": "cc.Node",
"_name": "TimeLabel",
"_objFlags": 0,
"_parent": {
"__id__": 15
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 102,
"g": 68,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50.05,
"height": 27.72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
427.963,
1.101,
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": "63yfXbjOhDO7OOI37AwRXW"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "00:00",
"_N$string": "00:00",
"_fontSize": 20,
"_lineHeight": 22,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "18+R48nStLcZeo+SIuNJL4"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "c52f2bc8-8077-4245-a763-b4ea20884ec9"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "70MH/+uAVLfpCHqg4yKrpK"
},
{
"__type__": "cc.ProgressBar",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
},
"_enabled": true,
"_enabled": true,
"_N$totalLength": 880,
"_N$totalLength": 880,
...
@@ -2253,91 +1966,25 @@
...
@@ -2253,91 +1966,25 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 50
"__id__": 44
},
{
"__id__": 54
},
{
"__id__": 58
},
{
"__id__": 62
}
],
"_active": true,
"_components": [
{
"__id__": 66
},
},
{
{
"__id__": 67
"__id__": 48
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 715,
"height": 147
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-827.38,
-489,
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": "8b84L8rTdFIYQ0wz4GdmGB"
},
},
{
{
"__type__": "cc.Node",
"__id__": 52
"_name": "btn_revoke",
"_objFlags": 0,
"_parent": {
"__id__": 49
},
},
"_children": [
{
{
"__id__": 5
1
"__id__": 5
6
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 53
"__id__": 60
},
{
"__id__": 61
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2351,8 +1998,8 @@
...
@@ -2351,8 +1998,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
0
,
"width":
715
,
"height":
0
"height":
147
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -2363,8 +2010,8 @@
...
@@ -2363,8 +2010,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
247.834
,
-
827.38
,
3.442
,
-489
,
0,
0,
0,
0,
0,
0,
...
@@ -2386,20 +2033,23 @@
...
@@ -2386,20 +2033,23 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
64x6O9eo5CS4aMPzD599n3
"
"_id": "
8b84L8rTdFIYQ0wz4GdmGB
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
Background
",
"_name": "
btn_revoke
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
50
"__id__":
43
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 52
"__id__": 45
},
{
"__id__": 46
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2425,7 +2075,7 @@
...
@@ -2425,7 +2075,7 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0
,
-244.961
,
0,
0,
0,
0,
0,
0,
...
@@ -2448,14 +2098,14 @@
...
@@ -2448,14 +2098,14 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
f0ZOCRixpMkqhfu5EZ/eQQ
"
"_id": "
97Xn3sbcBHdpeOW6FFFbmf
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
51
"__id__":
44
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2480,25 +2130,29 @@
...
@@ -2480,25 +2130,29 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
406sfoHwBJd7xJeB2/lBzn
"
"_id": "
88dlJTWQhHaaXON+lJsNbQ
"
},
},
{
{
"__type__": "cc.Button",
"__type__": "cc.Button",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
50
"__id__":
44
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
"_grayMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"duration": 0.1,
"zoomScale": 1.2,
"zoomScale": 1.2,
"clickEvents": [],
"clickEvents": [
{
"__id__": 47
}
],
"_N$interactable": true,
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$enableAutoGrayEffect": false,
"_N$transition":
2
,
"_N$transition":
0
,
"transition":
2
,
"transition":
0
,
"_N$normalColor": {
"_N$normalColor": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 255,
"r": 255,
...
@@ -2541,107 +2195,40 @@
...
@@ -2541,107 +2195,40 @@
"b": 124,
"b": 124,
"a": 255
"a": 255
},
},
"_N$normalSprite": {
"_N$normalSprite": null,
"__uuid__": "12d00f0e-9581-4010-9d7d-acfd82020d99"
"_N$pressedSprite": null,
},
"pressedSprite": null,
"_N$pressedSprite": {
"_N$hoverSprite": null,
"__uuid__": "12d00f0e-9581-4010-9d7d-acfd82020d99"
"hoverSprite": null,
},
"_N$disabledSprite": null,
"pressedSprite": {
"_N$target": null,
"__uuid__": "12d00f0e-9581-4010-9d7d-acfd82020d99"
"_id": "2czR8+Nr5HZ5E1HOtA84QF"
},
"_N$hoverSprite": {
"__uuid__": "12d00f0e-9581-4010-9d7d-acfd82020d99"
},
"hoverSprite": {
"__uuid__": "12d00f0e-9581-4010-9d7d-acfd82020d99"
},
"_N$disabledSprite": {
"__uuid__": "29fc8493-c8ca-4fc9-a432-690d1a4a3595"
},
},
"_N$target": {
{
"__id__": 51
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
},
"_id": "8aUJe0/0NHOb78VWmNrszX"
"component": "",
"_componentId": "280c3rsZJJKnZ9RqbALVwtK",
"handler": "goHome",
"customEventData": ""
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "btn_back",
"_name": "btn_back",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 4
9
"__id__": 4
3
},
},
"_children": [
"_children": [],
{
"__id__": 55
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 57
"__id__": 49
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-120.475,
3.442,
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": "58Qphwwm1GT5FgdeTJXq09"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 54
},
},
"_children": [],
"_active": true,
"_components": [
{
{
"__id__": 5
6
"__id__": 5
0
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2667,8 +2254,8 @@
...
@@ -2667,8 +2254,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0
,
-118.167
,
0
,
-1.906
,
0,
0,
0,
0,
0,
0,
...
@@ -2690,14 +2277,14 @@
...
@@ -2690,14 +2277,14 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
d5zoCjBQFF5K8AkO76zhP7
"
"_id": "
3dAVURLD1Nqr+2bYwC1hWv
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
55
"__id__":
48
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2722,25 +2309,29 @@
...
@@ -2722,25 +2309,29 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
29Dp94b5FB7rxxp/VS56FM
"
"_id": "
6alfK4hAFPgolreg6TuFtg
"
},
},
{
{
"__type__": "cc.Button",
"__type__": "cc.Button",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
54
"__id__":
48
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
"_grayMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"duration": 0.1,
"zoomScale": 1.2,
"zoomScale": 1.2,
"clickEvents": [],
"clickEvents": [
{
"__id__": 51
}
],
"_N$interactable": true,
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$enableAutoGrayEffect": false,
"_N$transition":
2
,
"_N$transition":
0
,
"transition":
2
,
"transition":
0
,
"_N$normalColor": {
"_N$normalColor": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 255,
"r": 255,
...
@@ -2783,107 +2374,40 @@
...
@@ -2783,107 +2374,40 @@
"b": 124,
"b": 124,
"a": 255
"a": 255
},
},
"_N$normalSprite": {
"_N$normalSprite": null,
"__uuid__": "759c07cf-3a04-4ab0-9305-f3b491148d66"
"_N$pressedSprite": null,
},
"pressedSprite": null,
"_N$pressedSprite": {
"_N$hoverSprite": null,
"__uuid__": "759c07cf-3a04-4ab0-9305-f3b491148d66"
"hoverSprite": null,
},
"_N$disabledSprite": null,
"pressedSprite": {
"_N$target": null,
"__uuid__": "759c07cf-3a04-4ab0-9305-f3b491148d66"
"_id": "a9I1PXUw1Ab5xg1KoMuHFU"
},
"_N$hoverSprite": {
"__uuid__": "759c07cf-3a04-4ab0-9305-f3b491148d66"
},
"hoverSprite": {
"__uuid__": "759c07cf-3a04-4ab0-9305-f3b491148d66"
},
"_N$disabledSprite": {
"__uuid__": "7f0de106-cf7f-4a63-90cd-5bfcb1d9befc"
},
},
"_N$target": {
{
"__id__": 55
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
},
"_id": "e6XI5itJVMh7Sq03h7CSft"
"component": "",
"_componentId": "280c3rsZJJKnZ9RqbALVwtK",
"handler": "goBack",
"customEventData": ""
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "btn_next",
"_name": "btn_next",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 4
9
"__id__": 4
3
},
},
"_children": [
"_children": [],
{
"__id__": 59
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 61
"__id__": 53
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
13.768,
3.442,
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": "86AC4PgNtPm7QP4unACFWE"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 58
},
},
"_children": [],
"_active": true,
"_components": [
{
{
"__id__":
60
"__id__":
54
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2909,8 +2433,8 @@
...
@@ -2909,8 +2433,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0
,
22.345
,
0
,
-2.276
,
0,
0,
0,
0,
0,
0,
...
@@ -2932,14 +2456,14 @@
...
@@ -2932,14 +2456,14 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
b6tXYH6dhH0qjYWZf7dv7j
"
"_id": "
0dM9v3TZZJAqqt/dhm7Vjf
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
9
"__id__": 5
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2964,25 +2488,29 @@
...
@@ -2964,25 +2488,29 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
9aK9TCMcdNxLSj1kbzxd7Y
"
"_id": "
647jha/SFKFbkkBOFcsYfF
"
},
},
{
{
"__type__": "cc.Button",
"__type__": "cc.Button",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
8
"__id__": 5
2
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
"_grayMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"duration": 0.1,
"zoomScale": 1.2,
"zoomScale": 1.2,
"clickEvents": [],
"clickEvents": [
{
"__id__": 55
}
],
"_N$interactable": true,
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$enableAutoGrayEffect": false,
"_N$transition":
2
,
"_N$transition":
0
,
"transition":
2
,
"transition":
0
,
"_N$normalColor": {
"_N$normalColor": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 255,
"r": 255,
...
@@ -3025,107 +2553,40 @@
...
@@ -3025,107 +2553,40 @@
"b": 124,
"b": 124,
"a": 255
"a": 255
},
},
"_N$normalSprite": {
"_N$normalSprite": null,
"__uuid__": "7a1214f0-b4d6-4652-ad0f-c40b90e3822b"
"_N$pressedSprite": null,
},
"pressedSprite": null,
"_N$pressedSprite": {
"_N$hoverSprite": null,
"__uuid__": "7a1214f0-b4d6-4652-ad0f-c40b90e3822b"
"hoverSprite": null,
},
"_N$disabledSprite": null,
"pressedSprite": {
"_N$target": null,
"__uuid__": "7a1214f0-b4d6-4652-ad0f-c40b90e3822b"
"_id": "8dRCcAMTRM6IY2y2r6/KTs"
},
"_N$hoverSprite": {
"__uuid__": "7a1214f0-b4d6-4652-ad0f-c40b90e3822b"
},
"hoverSprite": {
"__uuid__": "7a1214f0-b4d6-4652-ad0f-c40b90e3822b"
},
"_N$disabledSprite": {
"__uuid__": "4088901d-82cc-4ca8-a287-45fb774e0115"
},
},
"_N$target": {
{
"__id__": 59
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
},
"_id": "a8jbG1rQpJVbT/0zNShQpM"
"component": "",
"_componentId": "280c3rsZJJKnZ9RqbALVwtK",
"handler": "goNext",
"customEventData": ""
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "btn_again",
"_name": "btn_again",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 4
9
"__id__": 4
3
},
},
"_children": [
"_children": [],
{
"__id__": 63
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 65
"__id__": 57
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
144.569,
3.442,
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": "a0ZXnKjcNDzZAaMa4Orhf7"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 62
},
},
"_children": [],
"_active": true,
"_components": [
{
{
"__id__":
64
"__id__":
58
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3151,8 +2612,8 @@
...
@@ -3151,8 +2612,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0
,
147.343
,
0
,
-0.788
,
0,
0,
0,
0,
0,
0,
...
@@ -3174,14 +2635,14 @@
...
@@ -3174,14 +2635,14 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
eavxCuTP1Mhahw32U6imqS
"
"_id": "
1d7A6QmKxNPKalXpF0gbWp
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
63
"__id__":
56
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3206,25 +2667,29 @@
...
@@ -3206,25 +2667,29 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
8ef/0V9BNGN5x4M5+xGvUg
"
"_id": "
d8KI7jkbdH35Z1I7GXNcSe
"
},
},
{
{
"__type__": "cc.Button",
"__type__": "cc.Button",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
62
"__id__":
56
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
"_grayMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"duration": 0.1,
"zoomScale": 1.2,
"zoomScale": 1.2,
"clickEvents": [],
"clickEvents": [
{
"__id__": 59
}
],
"_N$interactable": true,
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$enableAutoGrayEffect": false,
"_N$transition":
2
,
"_N$transition":
0
,
"transition":
2
,
"transition":
0
,
"_N$normalColor": {
"_N$normalColor": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 255,
"r": 255,
...
@@ -3267,35 +2732,31 @@
...
@@ -3267,35 +2732,31 @@
"b": 124,
"b": 124,
"a": 255
"a": 255
},
},
"_N$normalSprite": {
"_N$normalSprite": null,
"__uuid__": "9f8196e7-3e60-444a-8a0f-fd88a75723ce"
"_N$pressedSprite": null,
},
"pressedSprite": null,
"_N$pressedSprite": {
"_N$hoverSprite": null,
"__uuid__": "9f8196e7-3e60-444a-8a0f-fd88a75723ce"
"hoverSprite": null,
},
"_N$disabledSprite": null,
"pressedSprite": {
"_N$target": null,
"__uuid__": "9f8196e7-3e60-444a-8a0f-fd88a75723ce"
"_id": "93iHKg7VtG+qdmbyA6n7F+"
},
"_N$hoverSprite": {
"__uuid__": "9f8196e7-3e60-444a-8a0f-fd88a75723ce"
},
"hoverSprite": {
"__uuid__": "9f8196e7-3e60-444a-8a0f-fd88a75723ce"
},
"_N$disabledSprite": {
"__uuid__": "c1092613-fe2b-43ec-99b5-d7eae9c41b5a"
},
},
"_N$target": {
{
"__id__": 63
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
},
"_id": "42FDGaL3hCK5uDNxfJmQah"
"component": "",
"_componentId": "280c3rsZJJKnZ9RqbALVwtK",
"handler": "replay",
"customEventData": ""
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 4
9
"__id__": 4
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3327,7 +2788,7 @@
...
@@ -3327,7 +2788,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 4
9
"__id__": 4
3
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -3358,31 +2819,31 @@
...
@@ -3358,31 +2819,31 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 6
9
"__id__": 6
3
},
},
{
{
"__id__":
73
"__id__":
67
},
},
{
{
"__id__":
75
"__id__":
69
},
},
{
{
"__id__": 7
7
"__id__": 7
1
},
},
{
{
"__id__":
80
"__id__":
74
},
},
{
{
"__id__":
83
"__id__":
77
},
},
{
{
"__id__": 8
6
"__id__": 8
0
}
}
],
],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 8
9
"__id__": 8
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3438,19 +2899,19 @@
...
@@ -3438,19 +2899,19 @@
"_name": "New Sprite(Splash)",
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
8
"__id__": 6
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
70
"__id__":
64
},
},
{
{
"__id__":
71
"__id__":
65
},
},
{
{
"__id__":
72
"__id__":
66
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3506,7 +2967,7 @@
...
@@ -3506,7 +2967,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
9
"__id__": 6
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3538,7 +2999,7 @@
...
@@ -3538,7 +2999,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
9
"__id__": 6
3
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -3565,7 +3026,7 @@
...
@@ -3565,7 +3026,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
9
"__id__": 6
3
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -3633,13 +3094,13 @@
...
@@ -3633,13 +3094,13 @@
"_name": "startbg",
"_name": "startbg",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
8
"__id__": 6
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
74
"__id__":
68
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3695,7 +3156,7 @@
...
@@ -3695,7 +3156,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
73
"__id__":
67
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3727,13 +3188,13 @@
...
@@ -3727,13 +3188,13 @@
"_name": "desc",
"_name": "desc",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
8
"__id__": 6
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 7
6
"__id__": 7
0
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3789,7 +3250,7 @@
...
@@ -3789,7 +3250,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
75
"__id__":
69
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3824,16 +3285,16 @@
...
@@ -3824,16 +3285,16 @@
"_name": "continue",
"_name": "continue",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
8
"__id__": 6
2
},
},
"_children": [],
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
"_components": [
{
{
"__id__": 7
8
"__id__": 7
2
},
},
{
{
"__id__": 7
9
"__id__": 7
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3889,7 +3350,7 @@
...
@@ -3889,7 +3350,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
7
"__id__": 7
1
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3921,7 +3382,7 @@
...
@@ -3921,7 +3382,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
7
"__id__": 7
1
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -3989,16 +3450,16 @@
...
@@ -3989,16 +3450,16 @@
"_name": "leave",
"_name": "leave",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
8
"__id__": 6
2
},
},
"_children": [],
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
"_components": [
{
{
"__id__":
81
"__id__":
75
},
},
{
{
"__id__":
82
"__id__":
76
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4054,7 +3515,7 @@
...
@@ -4054,7 +3515,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
80
"__id__":
74
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4086,7 +3547,7 @@
...
@@ -4086,7 +3547,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
80
"__id__":
74
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -4154,16 +3615,16 @@
...
@@ -4154,16 +3615,16 @@
"_name": "btn_bl",
"_name": "btn_bl",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
8
"__id__": 6
2
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
84
"__id__":
78
},
},
{
{
"__id__":
85
"__id__":
79
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4219,7 +3680,7 @@
...
@@ -4219,7 +3680,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
83
"__id__":
77
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4251,7 +3712,7 @@
...
@@ -4251,7 +3712,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
83
"__id__":
77
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -4319,16 +3780,16 @@
...
@@ -4319,16 +3780,16 @@
"_name": "btn_zcdt",
"_name": "btn_zcdt",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
8
"__id__": 6
2
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 8
7
"__id__": 8
1
},
},
{
{
"__id__": 8
8
"__id__": 8
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4384,7 +3845,7 @@
...
@@ -4384,7 +3845,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
6
"__id__": 8
0
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4416,7 +3877,7 @@
...
@@ -4416,7 +3877,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
6
"__id__": 8
0
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -4484,7 +3945,7 @@
...
@@ -4484,7 +3945,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
8
"__id__": 6
2
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -4562,7 +4023,7 @@
...
@@ -4562,7 +4023,7 @@
"__id__": 11
"__id__": 11
},
},
"ProgressBar": {
"ProgressBar": {
"__id__": 4
7
"__id__": 4
1
},
},
"playButton": {
"playButton": {
"__id__": 25
"__id__": 25
...
@@ -4570,16 +4031,14 @@
...
@@ -4570,16 +4031,14 @@
"pauseButton": {
"pauseButton": {
"__id__": 31
"__id__": 31
},
},
"restartButton": {
"restartButton": null,
"__id__": 37
},
"backButton": null,
"backButton": null,
"forwardButton": null,
"forwardButton": null,
"durationLabel": {
"durationLabel": {
"__id__":
45
"__id__":
39
},
},
"currentTimeLabel": {
"currentTimeLabel": {
"__id__":
40
"__id__":
34
},
},
"barTag": {
"barTag": {
"__id__": 17
"__id__": 17
...
...
assets/xy_video/Scene/xy_video.js
View file @
3269a629
import
{
buttonOnceClick
}
from
"
../Script/util
"
;
cc
.
Class
({
cc
.
Class
({
extends
:
cc
.
Component
,
extends
:
cc
.
Component
,
...
@@ -131,6 +133,7 @@ cc.Class({
...
@@ -131,6 +133,7 @@ cc.Class({
console
.
log
(
'
Resize
'
,
params
);
console
.
log
(
'
Resize
'
,
params
);
this
.
initdDrag
()
this
.
initdDrag
()
});
});
// this.initListener();
this
.
initdDrag
();
this
.
initdDrag
();
// console.log(11111)
// console.log(11111)
// this.videoPlayer = this.node.getComponent(cc.VideoPlayer);
// this.videoPlayer = this.node.getComponent(cc.VideoPlayer);
...
@@ -139,6 +142,9 @@ cc.Class({
...
@@ -139,6 +142,9 @@ cc.Class({
}
}
cc
.
debug
.
setDisplayStats
(
false
);
cc
.
debug
.
setDisplayStats
(
false
);
},
},
// initListener() {
// buttonOnClick(cc.find(`Canvas/btnbg/btn_again`), this.replay);
// },
initdDrag
()
{
initdDrag
()
{
const
maxX
=
this
.
ProgressBar
.
node
.
width
;
const
maxX
=
this
.
ProgressBar
.
node
.
width
;
const
minX
=
0
;
const
minX
=
0
;
...
@@ -358,7 +364,7 @@ cc.Class({
...
@@ -358,7 +364,7 @@ cc.Class({
replay
(){
replay
(){
this
.
videoPlayer
.
currentTime
=
0
;
this
.
videoPlayer
.
currentTime
=
0
;
this
.
videoPlayer
.
play
();
this
.
videoPlayer
.
play
();
this
.
triggerInteractive
()
this
.
triggerInteractive
()
;
},
},
preload
()
{
preload
()
{
...
@@ -371,6 +377,76 @@ cc.Class({
...
@@ -371,6 +377,76 @@ cc.Class({
}
}
});
});
},
},
isOver
:
null
,
onLeave
(
cb
)
{
if
(
!
this
.
isOver
)
{
this
.
videoPlayer
.
pause
();
this
.
triggerInteractive
();
this
.
videoPlayer
.
node
.
active
=
false
;
const
tips
=
cc
.
find
(
"
tips
"
,
this
.
node
);
cc
.
find
(
`continue`
,
tips
).
active
=
true
;
cc
.
find
(
`leave`
,
tips
).
active
=
true
;
cc
.
find
(
`btn_bl`
,
tips
).
active
=
false
;
cc
.
find
(
`btn_zcdt`
,
tips
).
active
=
false
;
tips
.
active
=
true
;
cc
.
find
(
`desc`
,
tips
).
getComponent
(
cc
.
Label
).
string
=
"
确定放弃本次答题么?
"
;
buttonOnceClick
(
cc
.
find
(
`continue`
,
tips
),
()
=>
{
tips
.
active
=
false
;
this
.
videoPlayer
.
node
.
active
=
true
;
this
.
videoPlayer
.
play
();
this
.
triggerInteractive
();
});
buttonOnceClick
(
cc
.
find
(
`leave`
,
tips
),
()
=>
{
tips
.
active
=
false
;
cb
();
});
}
else
{
cb
();
}
},
goBack
()
{
this
.
onLeave
(()
=>
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
mc
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
// 切换上一页
mc
.
goPrePage
();
}
else
{
console
.
log
(
"
==切换上一页==
"
);
}
});
},
goNext
()
{
this
.
onLeave
(()
=>
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
mc
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
// // 切换下一页
mc
.
goNextPage
();
}
else
{
console
.
log
(
"
==切换下一页==
"
);
}
});
},
goHome
()
{
this
.
onLeave
(()
=>
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
mc
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
// 回首页
mc
.
goTarIndexPage
(
0
);
}
else
{
console
.
log
(
"
==回首页==
"
);
}
});
},
// called every frame
// called every frame
update
:
function
(
dt
)
{
update
:
function
(
dt
)
{
// if (this._isReadyToPlay) {
// if (this._isReadyToPlay) {
...
...
assets/xy_video/Script/util.js
0 → 100644
View file @
3269a629
export
function
getPosByAngle
(
angle
,
len
)
{
const
radian
=
angle
*
Math
.
PI
/
180
;
const
x
=
Math
.
sin
(
radian
)
*
len
;
const
y
=
Math
.
cos
(
radian
)
*
len
;
return
{
x
,
y
};
}
export
function
getAngleByPos
(
px
,
py
,
mx
,
my
)
{
const
x
=
Math
.
abs
(
px
-
mx
);
const
y
=
Math
.
abs
(
py
-
my
);
const
z
=
Math
.
sqrt
(
Math
.
pow
(
x
,
2
)
+
Math
.
pow
(
y
,
2
));
const
cos
=
y
/
z
;
const
radina
=
Math
.
acos
(
cos
);
// 用反三角函数求弧度
let
angle
=
Math
.
floor
(
180
/
(
Math
.
PI
/
radina
)
*
100
)
/
100
;
// 将弧度转换成角度
if
(
mx
>
px
&&
my
>
py
)
{
// 鼠标在第四象限
angle
=
180
-
angle
;
}
if
(
mx
===
px
&&
my
>
py
)
{
// 鼠标在y轴负方向上
angle
=
180
;
}
if
(
mx
>
px
&&
my
===
py
)
{
// 鼠标在x轴正方向上
angle
=
90
;
}
if
(
mx
<
px
&&
my
>
py
)
{
// 鼠标在第三象限
angle
=
180
+
angle
;
}
if
(
mx
<
px
&&
my
===
py
)
{
// 鼠标在x轴负方向
angle
=
270
;
}
if
(
mx
<
px
&&
my
<
py
)
{
// 鼠标在第二象限
angle
=
360
-
angle
;
}
// console.log('angle: ', angle);
return
angle
;
}
export
function
exchangeNodePos
(
baseNode
,
targetNode
)
{
return
baseNode
.
convertToNodeSpaceAR
(
targetNode
.
_parent
.
convertToWorldSpaceAR
(
cc
.
v2
(
targetNode
.
x
,
targetNode
.
y
)));
}
export
function
RandomInt
(
a
,
b
=
0
)
{
let
max
=
Math
.
max
(
a
,
b
);
let
min
=
Math
.
min
(
a
,
b
);
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
)
+
min
);
}
export
function
randomSortByArr
(
arr
)
{
const
newArr
=
[];
const
tmpArr
=
arr
.
concat
();
while
(
tmpArr
.
length
>
0
)
{
const
randomIndex
=
Math
.
floor
(
tmpArr
.
length
*
Math
.
random
());
newArr
.
push
(
tmpArr
[
randomIndex
]);
tmpArr
.
splice
(
randomIndex
,
1
);
}
return
newArr
;
}
export
function
setSprNodeMaxLen
(
sprNode
,
maxW
,
maxH
)
{
const
sx
=
maxW
/
sprNode
.
width
;
const
sy
=
maxH
/
sprNode
.
height
;
const
s
=
Math
.
min
(
sx
,
sy
);
sprNode
.
scale
=
Math
.
round
(
s
*
1000
)
/
1000
;
}
export
function
localPosTolocalPos
(
baseNode
,
targetNode
)
{
const
worldPos
=
targetNode
.
parent
.
convertToWorldSpaceAR
(
cc
.
v2
(
targetNode
.
x
,
targetNode
.
y
));
const
localPos
=
baseNode
.
parent
.
convertToNodeSpaceAR
(
cc
.
v2
(
worldPos
.
x
,
worldPos
.
y
));
return
localPos
;
}
export
function
worldPosToLocalPos
(
worldPos
,
baseNode
)
{
const
localPos
=
baseNode
.
parent
.
convertToNodeSpaceAR
(
cc
.
v2
(
worldPos
.
x
,
worldPos
.
y
));
return
localPos
;
}
export
function
getScaleRateBy2Node
(
baseNode
,
targetNode
,
maxFlag
=
true
)
{
const
worldRect1
=
targetNode
.
getBoundingBoxToWorld
();
const
worldRect2
=
baseNode
.
getBoundingBoxToWorld
();
const
sx
=
worldRect1
.
width
/
worldRect2
.
width
;
const
sy
=
worldRect1
.
height
/
worldRect2
.
height
;
if
(
maxFlag
)
{
return
Math
.
max
(
sx
,
sy
);
}
else
{
return
Math
.
min
(
sx
,
sy
);
}
}
export
function
getDistance
(
start
,
end
)
{
var
pos
=
cc
.
v2
(
start
.
x
-
end
.
x
,
start
.
y
-
end
.
y
);
var
dis
=
Math
.
sqrt
(
pos
.
x
*
pos
.
x
+
pos
.
y
*
pos
.
y
);
return
dis
;
}
export
function
playAudioByUrl
(
audio_url
,
cb
=
null
)
{
if
(
audio_url
)
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
if
(
cb
)
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cb
();
});
}
});
}
}
export
function
btnClickAnima
(
btn
,
time
=
0.15
,
rate
=
1.05
)
{
btn
.
tmpScale
=
btn
.
scale
;
btn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
()
=>
{
cc
.
tween
(
btn
)
.
to
(
time
/
2
,
{
scale
:
btn
.
scale
*
rate
})
.
start
()
})
btn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_CANCEL
,
()
=>
{
cc
.
tween
(
btn
)
.
to
(
time
/
2
,
{
scale
:
btn
.
tmpScale
})
.
start
()
})
btn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
()
=>
{
cc
.
tween
(
btn
)
.
to
(
time
/
2
,
{
scale
:
btn
.
tmpScale
})
.
start
()
})
}
export
function
getSpriteFrimeByUrl
(
url
,
cb
)
{
cc
.
loader
.
load
({
url
},
(
err
,
img
)
=>
{
const
spriteFrame
=
new
cc
.
SpriteFrame
(
img
)
if
(
cb
)
{
cb
(
spriteFrame
);
}
})
}
export
function
getSprNode
(
resName
)
{
const
sf
=
cc
.
find
(
'
Canvas/res/img/
'
+
resName
).
getComponent
(
cc
.
Sprite
).
spriteFrame
;
const
node
=
new
cc
.
Node
();
node
.
addComponent
(
cc
.
Sprite
).
spriteFrame
=
sf
;
return
node
;
}
export
function
getSprNodeByUrl
(
url
,
cb
)
{
const
node
=
new
cc
.
Node
();
const
spr
=
node
.
addComponent
(
cc
.
Sprite
);
getSpriteFrimeByUrl
(
url
,
(
sf
)
=>
{
spr
.
spriteFrame
=
sf
;
if
(
cb
)
{
cb
(
spr
);
}
})
}
export
function
playAudio
(
audioClip
,
cb
=
null
)
{
if
(
audioClip
)
{
const
audioId
=
cc
.
audioEngine
.
playEffect
(
audioClip
,
false
);
if
(
cb
)
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cb
();
});
}
}
}
export
async
function
asyncDelay
(
time
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
cc
.
tween
(
cc
.
find
(
'
Canvas
'
))
.
delay
(
time
)
.
call
(()
=>
{
resolve
(
null
);
})
.
start
();
}
catch
(
e
)
{
reject
(
e
);
}
})
}
export
async
function
asyncLoadDragonBoneAnime
(
node
,
{
skeJsonData
:
{
url
:
skeJsonDataUrl
},
texJsonData
:
{
url
:
texJsonDataUrl
},
texPngData
:
{
url
:
texPngDataUrl
}
})
{
if
(
!
texPngDataUrl
||
!
texJsonDataUrl
||
!
texPngDataUrl
||
texPngDataUrl
==
''
||
texJsonDataUrl
==
''
||
texPngDataUrl
==
''
)
{
return
;
}
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
node
.
animaNode
)
{
node
.
animaNode
.
removeFromParent
();
}
const
animaNode
=
new
cc
.
Node
();
animaNode
.
name
=
'
animaNode
'
;
animaNode
.
parent
=
node
;
animaNode
.
active
=
true
;
node
.
animaNode
=
animaNode
;
const
dragonDisplay
=
animaNode
.
addComponent
(
dragonBones
.
ArmatureDisplay
);
const
loadTexture
=
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
assetManager
.
loadRemote
(
texPngDataUrl
,
(
error
,
texture
)
=>
{
if
(
error
)
{
reject
(
error
);
}
resolve
(
texture
);
});
});
const
loadTexJsonData
=
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
assetManager
.
loadAny
({
url
:
texJsonDataUrl
},
(
error
,
atlasJson
)
=>
{
if
(
error
)
{
reject
(
error
);
}
resolve
(
atlasJson
);
});
});
const
loadSkeJsonData
=
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
assetManager
.
loadAny
({
url
:
skeJsonDataUrl
},
(
error
,
dragonBonesJson
)
=>
{
if
(
error
)
{
reject
(
error
);
}
resolve
(
dragonBonesJson
);
});
});
Promise
.
all
([
loadTexture
,
loadTexJsonData
,
loadSkeJsonData
]).
then
(([
texture
,
atlasJson
,
dragonBonesJson
])
=>
{
const
atlas
=
new
dragonBones
.
DragonBonesAtlasAsset
();
atlas
.
atlasJson
=
JSON
.
stringify
(
atlasJson
);
atlas
.
texture
=
texture
;
const
asset
=
new
dragonBones
.
DragonBonesAsset
();
asset
.
dragonBonesJson
=
JSON
.
stringify
(
dragonBonesJson
);
dragonDisplay
.
dragonAtlasAsset
=
atlas
;
dragonDisplay
.
dragonAsset
=
asset
;
let
armatureNames
=
(
dragonBonesJson
).
armature
.
map
(
data
=>
data
.
name
);
if
(
armatureNames
.
length
>
0
)
{
dragonDisplay
.
armatureName
=
armatureNames
[
0
];
}
resolve
(
animaNode
);
});
});
}
export
class
FireworkSettings
{
baseNode
;
// 父节点
nodeList
;
// 火花节点的array
pos
;
// 发射点
side
;
// 发射方向
range
;
// 扩散范围
number
;
// 发射数量
scalseRange
;
// 缩放范围
constructor
(
baseNode
,
nodeList
,
pos
=
cc
.
v2
(
0
,
0
),
side
=
cc
.
v2
(
0
,
100
),
range
=
50
,
number
=
100
,
scalseRange
=
0
)
{
this
.
baseNode
=
baseNode
;
this
.
nodeList
=
nodeList
;
this
.
pos
=
pos
;
this
.
side
=
side
;
this
.
range
=
range
;
this
.
number
=
number
;
this
.
scalseRange
=
scalseRange
;
}
static
copy
(
firework
)
{
return
new
FireworkSettings
(
firework
.
baseNode
,
firework
.
nodeList
,
firework
.
pos
,
firework
.
side
,
firework
.
range
,
firework
.
number
,
);
}
}
export
async
function
showFireworks
(
fireworkSettings
)
{
const
{
baseNode
,
nodeList
,
pos
,
side
,
range
,
number
,
scalseRange
}
=
fireworkSettings
;
new
Array
(
number
).
fill
(
'
'
).
forEach
(
async
(
_
,
i
)
=>
{
let
rabbonNode
=
new
cc
.
Node
();
rabbonNode
.
parent
=
baseNode
;
rabbonNode
.
x
=
pos
.
x
;
rabbonNode
.
y
=
pos
.
y
;
rabbonNode
.
angle
=
60
*
Math
.
random
()
-
30
;
let
node
=
cc
.
instantiate
(
nodeList
[
RandomInt
(
nodeList
.
length
)]);
node
.
parent
=
rabbonNode
;
node
.
active
=
true
;
node
.
x
=
0
;
node
.
y
=
0
;
node
.
angle
=
0
;
node
.
scale
=
(
Math
.
random
()
-
0.5
)
*
scalseRange
+
1
;
const
rate
=
Math
.
random
();
const
angle
=
Math
.
PI
*
(
Math
.
random
()
*
2
-
1
);
await
asyncTweenBy
(
rabbonNode
,
0.3
,
{
x
:
side
.
x
*
rate
+
Math
.
cos
(
angle
)
*
range
*
rate
,
y
:
side
.
y
*
rate
+
Math
.
sin
(
angle
)
*
range
*
rate
},
{
easing
:
'
quadIn
'
});
cc
.
tween
(
rabbonNode
)
.
by
(
8
,
{
y
:
-
2000
})
.
start
();
cc
.
tween
(
rabbonNode
)
.
to
(
5
,
{
scale
:
(
Math
.
random
()
-
0.5
)
*
scalseRange
+
1
})
.
start
();
rabbonFall
(
rabbonNode
);
await
asyncDelay
(
Math
.
random
());
cc
.
tween
(
node
)
.
by
(
0.15
,
{
x
:
-
10
,
angle
:
-
10
})
.
by
(
0.3
,
{
x
:
20
,
angle
:
20
})
.
by
(
0.15
,
{
x
:
-
10
,
angle
:
-
10
})
.
union
()
.
repeatForever
()
.
start
();
cc
.
tween
(
rabbonNode
)
.
delay
(
5
)
.
to
(
0.3
,
{
opacity
:
0
})
.
call
(()
=>
{
node
.
stopAllActions
();
node
.
active
=
false
;
node
.
parent
=
null
;
node
=
null
;
})
.
start
();
});
}
async
function
rabbonFall
(
node
)
{
const
time
=
1
+
Math
.
random
();
const
offsetX
=
RandomInt
(
-
200
,
200
)
*
time
;
await
asyncTweenBy
(
node
,
time
,
{
x
:
offsetX
,
angle
:
offsetX
*
60
/
200
});
rabbonFall
(
node
);
}
export
async
function
asyncTweenTo
(
node
,
duration
,
obj
,
ease
=
undefined
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
cc
.
tween
(
node
)
.
to
(
duration
,
obj
,
ease
)
.
call
(()
=>
{
resolve
(
null
);
})
.
start
();
}
catch
(
e
)
{
reject
(
e
);
}
});
}
export
async
function
asyncTweenBy
(
node
,
duration
,
obj
,
ease
=
undefined
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
cc
.
tween
(
node
)
.
by
(
duration
,
obj
,
ease
)
.
call
(()
=>
{
resolve
(
null
);
})
.
start
();
}
catch
(
e
)
{
reject
(
e
);
}
});
}
export
function
showTrebleFirework
(
baseNode
,
rabbonList
)
{
const
middle
=
new
FireworkSettings
(
baseNode
,
rabbonList
);
middle
.
pos
=
cc
.
v2
(
0
,
-
400
);
middle
.
side
=
cc
.
v2
(
0
,
1000
);
middle
.
range
=
200
;
middle
.
number
=
100
;
middle
.
scalseRange
=
0.4
;
const
left
=
FireworkSettings
.
copy
(
middle
);
left
.
pos
=
cc
.
v2
(
-
600
,
-
400
);
left
.
side
=
cc
.
v2
(
200
,
1000
);
const
right
=
FireworkSettings
.
copy
(
middle
);
right
.
pos
=
cc
.
v2
(
600
,
-
400
);
right
.
side
=
cc
.
v2
(
-
200
,
1000
);
showFireworks
(
middle
);
showFireworks
(
left
);
showFireworks
(
right
);
}
export
function
onHomeworkFinish
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
if
(
middleLayerComponent
.
role
==
'
student
'
)
{
middleLayerComponent
.
onHomeworkFinish
(()
=>
{
});
}
}
else
{
console
.
log
(
'
onHomeworkFinish
'
);
}
}
export
function
jumpToBundle
(
bundleName
)
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
middleLayerComponent
.
loadOnlineBundle
(
bundleName
);
}
else
{
console
.
log
(
'
jump to bundle:
'
+
bundleName
);
}
}
export
function
jumpToLogin
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
middleLayerComponent
.
loadOnlineBundle
(
"
NJ_login
"
);
}
else
{
console
.
log
(
'
jump to bundle: NJ_login
'
);
}
}
export
function
asyncCallNetworkApiGet
(
apiName
,
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
callNetworkApiGet
(
apiName
,
data
,
(
res
=>
{
resolve
(
res
);
}));
});
}
export
function
asyncCallNetworkApiPost
(
uri
,
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
callNetworkApiPost
(
uri
,
data
,
(
res
)
=>
{
resolve
(
res
);
});
});
}
export
function
callNetworkApiPost
(
uri
,
data
,
callBack
)
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
)?.
getComponent
(
'
middleLayer
'
);
if
(
middleLayer
)
{
middleLayer
.
callNetworkApiPost
(
uri
,
data
,
callBack
);
return
;
}
const
baseUrl
=
'
http://staging-openapi.iteachabc.com
'
;
const
xhr
=
new
XMLHttpRequest
();
const
url
=
`
${
baseUrl
}${
uri
}
`
;
xhr
.
open
(
"
POST
"
,
url
,
true
);
xhr
.
setRequestHeader
(
'
content-type
'
,
'
application/json
'
);
xhr
.
onreadystatechange
=
()
=>
{
if
(
xhr
.
readyState
==
4
)
{
callBack
(
JSON
.
parse
(
xhr
.
responseText
));
}
}
xhr
.
send
(
JSON
.
stringify
(
data
));
}
export
function
callNetworkApiGet
(
uri
,
data
,
callBack
)
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
)?.
getComponent
(
'
middleLayer
'
);
if
(
middleLayer
)
{
middleLayer
.
callNetworkApiGet
(
uri
,
data
,
callBack
);
return
;
}
const
baseUrl
=
'
http://staging-openapi.iteachabc.com
'
;
let
queryStr
=
'
?
'
;
const
params
=
[];
for
(
const
key
in
data
)
{
if
(
Object
.
hasOwnProperty
.
call
(
data
,
key
))
{
params
.
push
(
`
${
key
}
=
${
data
[
key
]}
`
);
}
}
queryStr
+=
params
.
join
(
"
&
"
);
const
xhr
=
new
XMLHttpRequest
();
xhr
.
onreadystatechange
=
()
=>
{
if
(
xhr
.
readyState
==
4
&&
(
xhr
.
status
>=
200
&&
xhr
.
status
<
400
))
{
callBack
(
xhr
.
responseText
);
}
};
const
url
=
`
${
baseUrl
}${
uri
}${
queryStr
}
`
;
console
.
log
(
'
url =
'
+
url
);
xhr
.
open
(
'
GET
'
,
url
,
true
);
xhr
.
send
();
}
function
httpHeadCall
(
requsetUrl
,
callback
)
{
let
xhr
=
new
XMLHttpRequest
();
console
.
log
(
"
Status: Send Post Request to
"
+
requsetUrl
);
try
{
xhr
.
onreadystatechange
=
()
=>
{
try
{
console
.
log
(
'
xhr.readyState:
'
,
xhr
.
readyState
);
if
(
xhr
.
readyState
==
4
)
{
if
((
xhr
.
status
>=
200
&&
xhr
.
status
<
400
))
{
callback
(
true
);
}
else
{
callback
(
false
);
}
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
};
xhr
.
open
(
"
HEAD
"
,
requsetUrl
,
true
);
xhr
.
send
();
xhr
.
timeout
=
15000
;
xhr
.
onerror
=
(
e
)
=>
{
console
.
log
(
"
汪汪汪 posterror
"
,
e
);
callback
(
false
);
};
xhr
.
ontimeout
=
(
e
)
=>
{
console
.
log
(
"
汪汪汪 ontimeout
"
,
e
);
callback
(
false
);
};
}
catch
(
e
)
{
console
.
log
(
"
Send Get Request error:
"
,
e
)
}
};
export
function
getVideoUrl
(
video_url
,
callback
)
{
const
url1
=
video_url
;
const
url2
=
url1
.
replace
(
/.mp4$/g
,
"
_l.mp4
"
);
httpHeadCall
(
url2
,
(
success
)
=>
{
if
(
success
)
{
console
.
log
(
'
return url2:
'
,
url2
);
callback
(
url2
);
}
else
{
console
.
log
(
'
return url1:
'
,
url1
);
callback
(
url1
);
}
})
};
export
function
buttonOnceClick
(
button
,
callback
,
scale
=
1.0
)
{
button
.
addComponent
(
cc
.
Button
);
const
func
=
()
=>
{
if
(
button
[
'
cantClick
'
])
{
return
;
}
button
[
'
cantClick
'
]
=
true
;
cc
.
tween
(
button
)
.
to
(
0.1
,
{
scale
:
scale
*
1.1
})
.
to
(
0.1
,
{
scale
:
scale
})
.
call
(()
=>
{
button
[
'
cantClick
'
]
=
false
;
callback
&&
callback
();
})
.
start
();
}
button
.
off
(
'
click
'
);
button
.
once
(
'
click
'
,
func
);
}
export
function
buttonOnClick
(
button
,
callback
,
scale
=
1.0
)
{
button
.
addComponent
(
cc
.
Button
);
button
.
on
(
'
click
'
,
()
=>
{
if
(
button
[
'
cantClick
'
])
{
return
;
}
button
[
'
cantClick
'
]
=
true
;
cc
.
tween
(
button
)
.
to
(
0.1
,
{
scale
:
scale
*
1.1
})
.
to
(
0.1
,
{
scale
:
scale
})
.
call
(()
=>
{
button
[
'
cantClick
'
]
=
false
;
callback
&&
callback
();
})
.
start
();
});
}
assets/xy_video/Script/util.js.meta
0 → 100644
View file @
3269a629
{
"ver": "1.0.8",
"uuid": "8b8f565c-a90c-4919-ab4a-7cec87e53873",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment