Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_kyxq
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
middleLayer_for_kyxq
Commits
4846780e
Commit
4846780e
authored
Oct 18, 2023
by
曲世俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- feat cookie
parent
e3aecb8f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
3235 additions
and
1894 deletions
+3235
-1894
JJ_Video_01.prefab
assets/middleLayer_for_kyxq/JJ_Video_01/JJ_Video_01.prefab
+654
-200
JJ_Video_01.ts
assets/middleLayer_for_kyxq/JJ_Video_01/Scene/JJ_Video_01.ts
+67
-2
middleLayer_for_kyxq.fire
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
+2260
-1408
LibraryAudioPage.ts
assets/middleLayer_for_kyxq/script/LibraryAudioPage.ts
+3
-1
LibraryReadDetailPage.ts
assets/middleLayer_for_kyxq/script/LibraryReadDetailPage.ts
+3
-1
LibraryVideoPage.ts
assets/middleLayer_for_kyxq/script/LibraryVideoPage.ts
+3
-1
MissionPage.ts
assets/middleLayer_for_kyxq/script/MissionPage.ts
+192
-190
middleLayer.ts
assets/middleLayer_for_kyxq/script/middleLayer.ts
+53
-91
No files found.
assets/middleLayer_for_kyxq/JJ_Video_01/JJ_Video_01.prefab
View file @
4846780e
...
@@ -21,13 +21,13 @@
...
@@ -21,13 +21,13 @@
"__id__": 2
"__id__": 2
},
},
{
{
"__id__":
6
"__id__":
5
},
},
{
{
"__id__":
30
"__id__":
9
},
},
{
{
"__id__": 3
7
"__id__": 3
3
},
},
{
{
"__id__": 40
"__id__": 40
...
@@ -45,23 +45,29 @@
...
@@ -45,23 +45,29 @@
"__id__": 171
"__id__": 171
},
},
{
{
"__id__": 17
5
"__id__": 17
7
},
},
{
{
"__id__": 178
"__id__": 183
},
{
"__id__": 187
},
{
"__id__": 190
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
81
"__id__": 1
93
},
},
{
{
"__id__": 1
82
"__id__": 1
94
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 1
83
"__id__": 1
95
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -112,7 +118,7 @@
...
@@ -112,7 +118,7 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
bgwhit
e",
"_name": "
VideoNod
e",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
"__id__": 1
...
@@ -122,13 +128,108 @@
...
@@ -122,13 +128,108 @@
"_components": [
"_components": [
{
{
"__id__": 3
"__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": {
"_prefab": {
"__id__":
5
"__id__":
8
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -182,7 +283,7 @@
...
@@ -182,7 +283,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
2
"__id__":
5
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -214,7 +315,7 @@
...
@@ -214,7 +315,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
2
"__id__":
5
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -256,23 +357,23 @@
...
@@ -256,23 +357,23 @@
},
},
"_children": [
"_children": [
{
{
"__id__":
7
"__id__":
10
},
},
{
{
"__id__": 2
2
"__id__": 2
5
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
27
"__id__":
30
},
},
{
{
"__id__":
28
"__id__":
31
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
29
"__id__":
32
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -326,27 +427,27 @@
...
@@ -326,27 +427,27 @@
"_name": "bgNode",
"_name": "bgNode",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
6
"__id__":
9
},
},
"_children": [
"_children": [
{
{
"__id__":
8
"__id__":
11
},
},
{
{
"__id__": 1
2
"__id__": 1
5
},
},
{
{
"__id__": 1
6
"__id__": 1
9
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
0
"__id__": 2
3
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 2
1
"__id__": 2
4
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -400,20 +501,20 @@
...
@@ -400,20 +501,20 @@
"_name": "bg_bottom",
"_name": "bg_bottom",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
7
"__id__":
10
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
9
"__id__":
12
},
},
{
{
"__id__": 1
0
"__id__": 1
3
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 1
1
"__id__": 1
4
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -467,7 +568,7 @@
...
@@ -467,7 +568,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
8
"__id__":
11
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -499,7 +600,7 @@
...
@@ -499,7 +600,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
8
"__id__":
11
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -537,20 +638,20 @@
...
@@ -537,20 +638,20 @@
"_name": "bg_left",
"_name": "bg_left",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
7
"__id__":
10
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
3
"__id__": 1
6
},
},
{
{
"__id__": 1
4
"__id__": 1
7
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 1
5
"__id__": 1
8
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -604,7 +705,7 @@
...
@@ -604,7 +705,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
2
"__id__": 1
5
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -636,7 +737,7 @@
...
@@ -636,7 +737,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
2
"__id__": 1
5
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -674,20 +775,20 @@
...
@@ -674,20 +775,20 @@
"_name": "bg_right",
"_name": "bg_right",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
7
"__id__":
10
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
17
"__id__":
20
},
},
{
{
"__id__":
18
"__id__":
21
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
19
"__id__":
22
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -741,7 +842,7 @@
...
@@ -741,7 +842,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
6
"__id__": 1
9
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -773,7 +874,7 @@
...
@@ -773,7 +874,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
6
"__id__": 1
9
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -811,7 +912,7 @@
...
@@ -811,7 +912,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
7
"__id__":
10
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -849,17 +950,17 @@
...
@@ -849,17 +950,17 @@
"_name": "videoBg",
"_name": "videoBg",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
6
"__id__":
9
},
},
"_children": [
"_children": [
{
{
"__id__": 2
3
"__id__": 2
6
}
}
],
],
"_active": true,
"_active": true,
"_components": [],
"_components": [],
"_prefab": {
"_prefab": {
"__id__": 2
6
"__id__": 2
9
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -913,17 +1014,17 @@
...
@@ -913,17 +1014,17 @@
"_name": "bg_video_bottom",
"_name": "bg_video_bottom",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
2
"__id__": 2
5
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
4
"__id__": 2
7
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 2
5
"__id__": 2
8
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -977,7 +1078,7 @@
...
@@ -977,7 +1078,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
3
"__id__": 2
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1031,7 +1132,7 @@
...
@@ -1031,7 +1132,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
6
"__id__":
9
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1063,7 +1164,7 @@
...
@@ -1063,7 +1164,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
6
"__id__":
9
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -1105,17 +1206,17 @@
...
@@ -1105,17 +1206,17 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 3
1
"__id__": 3
4
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 3
5
"__id__": 3
8
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 3
6
"__id__": 3
9
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1169,20 +1270,20 @@
...
@@ -1169,20 +1270,20 @@
"_name": "bg",
"_name": "bg",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 3
0
"__id__": 3
3
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 3
2
"__id__": 3
5
},
},
{
{
"__id__": 3
3
"__id__": 3
6
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 3
4
"__id__": 3
7
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1236,7 +1337,7 @@
...
@@ -1236,7 +1337,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 3
1
"__id__": 3
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1268,7 +1369,7 @@
...
@@ -1268,7 +1369,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 3
1
"__id__": 3
4
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -1306,7 +1407,7 @@
...
@@ -1306,7 +1407,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 3
0
"__id__": 3
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1334,20 +1435,27 @@
...
@@ -1334,20 +1435,27 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
VideoNode
",
"_name": "
bg_video_shadow
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
"__id__": 1
},
},
"_children": [],
"_children": [
{
"__id__": 41
},
{
"__id__": 45
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
38
"__id__":
49
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
39
"__id__":
50
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1359,8 +1467,8 @@
...
@@ -1359,8 +1467,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
87
0,
"width":
132
0,
"height":
542
"height":
776
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1371,8 +1479,8 @@
...
@@ -1371,8 +1479,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
5000
,
-
0.2370000000000001
,
-5001.455
,
162.871
,
0,
0,
0,
0,
0,
0,
...
@@ -1396,60 +1504,25 @@
...
@@ -1396,60 +1504,25 @@
"groupIndex": 0,
"groupIndex": 0,
"_id": ""
"_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",
"__type__": "cc.Node",
"_name": "
bg_video_shadow
",
"_name": "
empty_white
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
1
"__id__":
40
},
},
"_children": [
"_children": [],
{
"__id__": 41
},
{
"__id__": 45
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 49
"__id__": 42
},
{
"__id__": 43
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
50
"__id__":
44
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1461,8 +1534,8 @@
...
@@ -1461,8 +1534,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
132
0,
"width":
87
0,
"height":
776
"height":
542
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1473,8 +1546,8 @@
...
@@ -1473,8 +1546,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
0.2370000000000001
,
-
4.924000000000035
,
1
62.871
,
1
4.865000000000009
,
0,
0,
0,
0,
0,
0,
...
@@ -1499,78 +1572,11 @@
...
@@ -1499,78 +1572,11 @@
"_id": ""
"_id": ""
},
},
{
{
"__type__": "cc.
Nod
e",
"__type__": "cc.
Sprit
e",
"_name": "
empty_white
",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"node": {
"__id__": 40
"__id__": 41
},
"_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
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6223,7 +6229,7 @@
...
@@ -6223,7 +6229,7 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
title
",
"_name": "
btn_last
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
"__id__": 1
...
@@ -6236,10 +6242,458 @@
...
@@ -6236,10 +6242,458 @@
},
},
{
{
"__id__": 173
"__id__": 173
},
{
"__id__": 175
}
}
],
],
"_prefab": {
"_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,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -6293,7 +6747,7 @@
...
@@ -6293,7 +6747,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
71
"__id__": 1
83
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6328,7 +6782,7 @@
...
@@ -6328,7 +6782,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
71
"__id__": 1
83
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -6372,11 +6826,11 @@
...
@@ -6372,11 +6826,11 @@
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 1
76
"__id__": 1
88
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 1
77
"__id__": 1
89
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -6430,7 +6884,7 @@
...
@@ -6430,7 +6884,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
75
"__id__": 1
87
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6479,11 +6933,11 @@
...
@@ -6479,11 +6933,11 @@
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 1
79
"__id__": 1
91
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 1
80
"__id__": 1
92
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -6537,7 +6991,7 @@
...
@@ -6537,7 +6991,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
78
"__id__": 1
90
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6619,7 +7073,7 @@
...
@@ -6619,7 +7073,7 @@
},
},
"_enabled": true,
"_enabled": true,
"videoPlayer": {
"videoPlayer": {
"__id__": 3
8
"__id__": 3
},
},
"ProgressBar": {
"ProgressBar": {
"__id__": 55
"__id__": 55
...
@@ -6648,7 +7102,7 @@
...
@@ -6648,7 +7102,7 @@
"__id__": 56
"__id__": 56
},
},
"loadingSprite": {
"loadingSprite": {
"__id__": 1
78
"__id__": 1
90
},
},
"_id": ""
"_id": ""
},
},
...
...
assets/middleLayer_for_kyxq/JJ_Video_01/Scene/JJ_Video_01.ts
View file @
4846780e
...
@@ -140,6 +140,16 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -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/bg
'
).
scale
=
this
.
_mapScaleMax
;
cc
.
find
(
'
JJ_Video_01/video_node/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
;
this
.
_isReadyToPlay
=
false
;
cc
.
macro
.
ENABLE_TRANSPARENT_CANVAS
=
true
;
cc
.
macro
.
ENABLE_TRANSPARENT_CANVAS
=
true
;
...
@@ -232,6 +242,33 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -232,6 +242,33 @@ export default class VideoPlayerComponent extends cc.Component {
});
});
this
.
initdDrag
();
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
()
{
initListener
()
{
...
@@ -388,6 +425,7 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -388,6 +425,7 @@ export default class VideoPlayerComponent extends cc.Component {
}
else
{
}
else
{
this
.
data
.
totalCount
=
1
;
this
.
data
.
totalCount
=
1
;
}
}
this
.
refreshLastNextBtns
()
}
}
start
()
{
start
()
{
...
@@ -404,6 +442,29 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -404,6 +442,29 @@ export default class VideoPlayerComponent extends cc.Component {
if
(
window
&&
window
[
"
air
"
])
{
if
(
window
&&
window
[
"
air
"
])
{
window
[
"
air
"
].
hideAirClassLoading
();
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
)
{
if
(
window
.
CustomEvent
)
{
...
@@ -548,7 +609,11 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -548,7 +609,11 @@ export default class VideoPlayerComponent extends cc.Component {
const
controlBg
=
cc
.
find
(
`bg_video_bottom`
,
controls
);
const
controlBg
=
cc
.
find
(
`bg_video_bottom`
,
controls
);
this
.
tempPos
.
controlPos
=
{
x
:
controls
.
x
,
y
:
controls
.
y
};
this
.
tempPos
.
controlPos
=
{
x
:
controls
.
x
,
y
:
controls
.
y
};
controls
.
x
=
300
;
// qsj
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
.
opacity
=
240
;
controlBg
.
width
=
this
.
node
.
width
;
controlBg
.
width
=
this
.
node
.
width
;
...
@@ -590,7 +655,7 @@ export default class VideoPlayerComponent extends cc.Component {
...
@@ -590,7 +655,7 @@ export default class VideoPlayerComponent extends cc.Component {
this
.
videoPlayer
.
node
.
x
=
videoContainer
.
x
;
this
.
videoPlayer
.
node
.
x
=
videoContainer
.
x
;
this
.
videoPlayer
.
node
.
y
=
videoContainer
.
y
;
this
.
videoPlayer
.
node
.
y
=
videoContainer
.
y
;
cc
.
find
(
`JJ_Video_01/videolist`
).
active
=
t
rue
;
cc
.
find
(
`JJ_Video_01/videolist`
).
active
=
t
his
.
data
.
dataArr
.
length
>
1
;
const
controls
=
cc
.
find
(
`JJ_Video_01/Controls`
);
const
controls
=
cc
.
find
(
`JJ_Video_01/Controls`
);
const
controlBg
=
cc
.
find
(
`bg_video_bottom`
,
controls
);
const
controlBg
=
cc
.
find
(
`bg_video_bottom`
,
controls
);
...
...
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
View file @
4846780e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
assets/middleLayer_for_kyxq/script/LibraryAudioPage.ts
View file @
4846780e
...
@@ -113,7 +113,9 @@ export default class NewClass extends cc.Component {
...
@@ -113,7 +113,9 @@ export default class NewClass extends cc.Component {
itemNode
.
addComponent
(
cc
.
Button
);
itemNode
.
addComponent
(
cc
.
Button
);
itemNode
.
on
(
"
click
"
,
()
=>
{
itemNode
.
on
(
"
click
"
,
()
=>
{
global
.
middleLayer
.
backPageNode
=
this
.
node
;
global
.
middleLayer
.
backPageNode
=
this
.
node
;
global
.
middleLayer
.
loadOnlineCourseWare
(
data
.
id
);
global
.
middleLayer
.
loadOnlineCourseWare
(
data
.
id
,
null
,
(
flag
)
=>
{
this
.
node
.
active
=!
flag
});
})
})
itemArr
.
push
(
itemNode
);
itemArr
.
push
(
itemNode
);
...
...
assets/middleLayer_for_kyxq/script/LibraryReadDetailPage.ts
View file @
4846780e
...
@@ -129,7 +129,9 @@ export default class NewClass extends cc.Component {
...
@@ -129,7 +129,9 @@ export default class NewClass extends cc.Component {
itemNode
.
addComponent
(
cc
.
Button
);
itemNode
.
addComponent
(
cc
.
Button
);
itemNode
.
on
(
"
click
"
,
()
=>
{
itemNode
.
on
(
"
click
"
,
()
=>
{
global
.
middleLayer
.
backPageNode
=
this
.
node
;
global
.
middleLayer
.
backPageNode
=
this
.
node
;
global
.
middleLayer
.
loadOnlineCourseWare
(
data
.
id
);
global
.
middleLayer
.
loadOnlineCourseWare
(
data
.
id
,
null
,
(
flag
)
=>
{
this
.
node
.
active
=!
flag
});
})
})
itemArr
.
push
(
itemNode
);
itemArr
.
push
(
itemNode
);
...
...
assets/middleLayer_for_kyxq/script/LibraryVideoPage.ts
View file @
4846780e
...
@@ -113,7 +113,9 @@ export default class NewClass extends cc.Component {
...
@@ -113,7 +113,9 @@ export default class NewClass extends cc.Component {
itemNode
.
addComponent
(
cc
.
Button
);
itemNode
.
addComponent
(
cc
.
Button
);
itemNode
.
on
(
"
click
"
,
async
()
=>
{
itemNode
.
on
(
"
click
"
,
async
()
=>
{
global
.
middleLayer
.
backPageNode
=
this
.
node
;
global
.
middleLayer
.
backPageNode
=
this
.
node
;
global
.
middleLayer
.
loadOnlineCourseWare
(
data
.
id
);
global
.
middleLayer
.
loadOnlineCourseWare
(
data
.
id
,
null
,
(
flag
)
=>
{
this
.
node
.
active
=!
flag
});
})
})
itemArr
.
push
(
itemNode
);
itemArr
.
push
(
itemNode
);
...
...
assets/middleLayer_for_kyxq/script/MissionPage.ts
View file @
4846780e
// Learn TypeScript:
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import
{
getSprNodeByUrl
,
setSprNodeMaxLen
,
asyncCallNetworkApiGet
,
asyncCallNetworkApiPost
}
from
"
./util
"
;
import
{
getSprNodeByUrl
,
setSprNodeMaxLen
,
asyncCallNetworkApiGet
,
asyncCallNetworkApiPost
}
from
"
./util
"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
@
ccclass
export
default
class
NewClass
extends
cc
.
Component
{
export
default
class
NewClass
extends
cc
.
Component
{
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
Viewer
:
cc
.
Node
=
null
;
Viewer
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
scrollView
:
cc
.
Node
=
null
;
scrollView
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
listItem
:
cc
.
Node
=
null
;
listItem
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
loading
:
cc
.
Node
=
null
;
loading
:
cc
.
Node
=
null
;
@
property
(
cc
.
Material
)
@
property
(
cc
.
Material
)
gray
:
cc
.
Material
=
null
;
gray
:
cc
.
Material
=
null
;
data
;
data
;
handleClickBackBtn
()
{
handleClickBackBtn
()
{
const
vc
=
this
.
Viewer
.
getComponent
(
"
PageViewer
"
);
const
vc
=
this
.
Viewer
.
getComponent
(
"
PageViewer
"
);
vc
.
toView
(
"
UnitPage
"
,
"
leftIn
"
)
vc
.
toView
(
"
UnitPage
"
,
"
leftIn
"
)
}
}
// LIFE-CYCLE CALLBACKS:
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
// onLoad () {}
async
start
()
{
async
start
()
{
this
.
loading
.
active
=
true
;
this
.
loading
.
active
=
true
;
await
this
.
initData
();
await
this
.
initData
();
await
this
.
getAndStoreSyllabusStatus
();
await
this
.
getAndStoreSyllabusStatus
();
await
this
.
initView
();
await
this
.
initView
();
this
.
loading
.
active
=
false
;
this
.
loading
.
active
=
false
;
}
}
async
initData
()
{
async
initData
()
{
const
{
rows
}
=
await
asyncCallNetworkApiGet
(
`/api/syllabus/v1/list`
,
{
pid
:
this
.
node
[
'
syllabus_pid
'
]});
const
{
rows
}
=
await
asyncCallNetworkApiGet
(
`/api/syllabus/v1/list`
,
{
pid
:
this
.
node
[
'
syllabus_pid
'
]});
this
.
data
=
rows
;
this
.
data
=
rows
;
}
}
syllabusLockStatusStore
=
{};
// 课件是否解锁的存储对象 { 99343: 'locked', 19834: 'unlock' }
syllabusLockStatusStore
=
{};
// 课件是否解锁的存储对象 { 99343: 'locked', 19834: 'unlock' }
async
getAndStoreSyllabusStatus
()
{
async
getAndStoreSyllabusStatus
()
{
const
syllabuses
=
this
.
data
.
map
(
item
=>
item
.
id
);
const
syllabuses
=
this
.
data
.
map
(
item
=>
item
.
id
);
const
{
rows
}
=
await
asyncCallNetworkApiGet
(
`/api/kyxq/v1/user/syllabus/status`
,
{
syllabuses
:
syllabuses
.
join
(
"
,
"
)});
const
{
rows
}
=
await
asyncCallNetworkApiGet
(
`/api/kyxq/v1/user/syllabus/status`
,
{
syllabuses
:
syllabuses
.
join
(
"
,
"
)});
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
const
row
=
rows
[
i
];
const
row
=
rows
[
i
];
if
(
syllabuses
.
includes
(
row
.
id
))
{
if
(
syllabuses
.
includes
(
row
.
id
))
{
this
.
syllabusLockStatusStore
[
row
.
id
]
=
row
.
unlock
==
0
?
'
locked
'
:
'
unlock
'
;
this
.
syllabusLockStatusStore
[
row
.
id
]
=
row
.
unlock
==
0
?
'
locked
'
:
'
unlock
'
;
}
}
}
}
}
}
async
initView
()
{
async
initView
()
{
this
.
initListView
();
this
.
initListView
();
}
}
initListView
()
{
initListView
()
{
const
svNode
=
this
.
scrollView
;
const
svNode
=
this
.
scrollView
;
const
view
=
cc
.
find
(
"
view
"
,
svNode
);
const
view
=
cc
.
find
(
"
view
"
,
svNode
);
view
.
width
=
svNode
.
width
;
view
.
width
=
svNode
.
width
;
view
.
height
=
svNode
.
height
;
view
.
height
=
svNode
.
height
;
const
itemArr
=
this
.
getItemArr
(
this
.
data
);
const
itemArr
=
this
.
getItemArr
(
this
.
data
);
const
sv
=
svNode
.
getComponent
(
cc
.
ScrollView
);
const
sv
=
svNode
.
getComponent
(
cc
.
ScrollView
);
this
.
initScrollViewItem
(
sv
,
itemArr
,
1
);
this
.
initScrollViewItem
(
sv
,
itemArr
,
1
);
}
}
getItemArr
(
dataArr
)
{
getItemArr
(
dataArr
)
{
const
itemArr
=
[];
const
itemArr
=
[];
for
(
let
i
=
0
;
i
<
dataArr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
dataArr
.
length
;
i
++
)
{
const
data
=
dataArr
[
i
];
const
data
=
dataArr
[
i
];
const
itemNode
=
cc
.
instantiate
(
this
.
listItem
);
const
itemNode
=
cc
.
instantiate
(
this
.
listItem
);
// 前期测试,都放开成解锁状态
// 前期测试,都放开成解锁状态
// const unLock = this.syllabusLockStatusStore[data.id]==='unlock';
// const unLock = this.syllabusLockStatusStore[data.id]==='unlock';
const
unLock
=
true
;
const
unLock
=
true
;
if
(
i
==
0
&&
!
unLock
)
{
if
(
i
==
0
&&
!
unLock
)
{
// 如果第一个是未解锁的状态,需要上报一个解锁并且渲染成解锁的状态
// 如果第一个是未解锁的状态,需要上报一个解锁并且渲染成解锁的状态
asyncCallNetworkApiPost
(
`/api/kyxq/v1/user/unlock`
,
{
syllabus_id
:
data
.
id
}).
then
((
res
)
=>
{
asyncCallNetworkApiPost
(
`/api/kyxq/v1/user/unlock`
,
{
syllabus_id
:
data
.
id
}).
then
((
res
)
=>
{
if
(
res
.
code
!=
200
)
{
if
(
res
.
code
!=
200
)
{
global
.
middleLayer
.
showTips
(
`解锁失败`
);
global
.
middleLayer
.
showTips
(
`解锁失败`
);
}
}
});
});
}
}
data
.
unLock
=
unLock
;
data
.
unLock
=
unLock
;
itemNode
[
'
data
'
]
=
data
;
itemNode
[
'
data
'
]
=
data
;
cc
.
find
(
"
title_label
"
,
itemNode
).
getComponent
(
cc
.
Label
).
string
=
data
.
name
;
cc
.
find
(
"
title_label
"
,
itemNode
).
getComponent
(
cc
.
Label
).
string
=
data
.
name
;
cc
.
find
(
"
English_label
"
,
itemNode
).
getComponent
(
cc
.
Label
).
string
=
data
.
tag
;
cc
.
find
(
"
English_label
"
,
itemNode
).
getComponent
(
cc
.
Label
).
string
=
data
.
tag
;
getSprNodeByUrl
(
data
.
cover
,
(
spr
)
=>
{
getSprNodeByUrl
(
data
.
cover
,
(
spr
)
=>
{
const
sprNode
=
spr
.
node
;
const
sprNode
=
spr
.
node
;
const
picLayer
=
cc
.
find
(
"
pic_layer
"
,
itemNode
);
const
picLayer
=
cc
.
find
(
"
pic_layer
"
,
itemNode
);
picLayer
.
addChild
(
sprNode
);
picLayer
.
addChild
(
sprNode
);
setSprNodeMaxLen
(
sprNode
,
picLayer
.
width
,
picLayer
.
height
,
true
);
setSprNodeMaxLen
(
sprNode
,
picLayer
.
width
,
picLayer
.
height
,
true
);
if
(
unLock
)
{
if
(
unLock
)
{
cc
.
find
(
`icon_lock`
,
itemNode
).
active
=
false
;
cc
.
find
(
`icon_lock`
,
itemNode
).
active
=
false
;
}
else
{
}
else
{
spr
.
setMaterial
(
0
,
this
.
gray
);
spr
.
setMaterial
(
0
,
this
.
gray
);
}
}
itemNode
.
active
=
true
;
itemNode
.
active
=
true
;
});
});
itemArr
.
push
(
itemNode
);
itemArr
.
push
(
itemNode
);
}
}
return
itemArr
;
return
itemArr
;
}
}
cardClick
(
evt
:
cc
.
Event
)
{
cardClick
(
evt
:
cc
.
Event
)
{
const
{
id
,
unLock
}
=
evt
.
currentTarget
.
data
;
const
{
id
,
unLock
}
=
evt
.
currentTarget
.
data
;
if
(
!
unLock
)
{
if
(
!
unLock
)
{
global
.
middleLayer
.
showTips
(
`未解锁`
);
global
.
middleLayer
.
showTips
(
`未解锁`
);
return
;
return
;
}
}
if
(
global
.
middleLayer
)
{
if
(
global
.
middleLayer
)
{
global
.
middleLayer
.
backPageNode
=
this
.
node
;
global
.
middleLayer
.
backPageNode
=
this
.
node
;
// global.middleLayer.loadOnlineCourseWare(id);
// global.middleLayer.loadOnlineCourseWare(id);
global
.
middleLayer
.
loadOnlineCourseWare
(
20522
);
global
.
middleLayer
.
loadOnlineCourseWare
(
20522
,
null
,
(
flag
)
=>
{
}
this
.
node
.
active
=!
flag
}
});
}
}
initScrollViewItem
(
sv
,
itemArr
,
row
=
1
)
{
sv
.
scrollToTop
();
initScrollViewItem
(
sv
,
itemArr
,
row
=
1
)
{
const
content
=
sv
.
content
;
content
.
width
=
sv
.
node
.
width
;
sv
.
scrollToTop
();
content
.
height
=
sv
.
node
.
height
;
const
content
=
sv
.
content
;
content
.
removeAllChildren
();
content
.
width
=
sv
.
node
.
width
;
content
.
height
=
sv
.
node
.
height
;
const
tempH
=
content
.
height
/
row
;
content
.
removeAllChildren
();
const
disY
=
tempH
*
0.95
;
const
baseY
=
(
row
-
1
)
*
0.5
*
disY
;
const
tempH
=
content
.
height
/
row
;
let
rowCount
=
0
;
const
disY
=
tempH
*
0.95
;
const
baseY
=
(
row
-
1
)
*
0.5
*
disY
;
const
disX
=
40
;
let
rowCount
=
0
;
const
baseX
=
itemArr
[
0
].
width
/
2
*
itemArr
[
0
].
scaleX
+
disX
;
let
colCount
=
0
;
const
disX
=
40
;
const
baseX
=
itemArr
[
0
].
width
/
2
*
itemArr
[
0
].
scaleX
+
disX
;
let
lastX
=
baseX
;
let
colCount
=
0
;
for
(
let
i
=
0
;
i
<
itemArr
.
length
;
i
++
)
{
let
lastX
=
baseX
;
const
item
=
itemArr
[
i
];
for
(
let
i
=
0
;
i
<
itemArr
.
length
;
i
++
)
{
item
.
x
=
lastX
+
disX
;
const
item
=
itemArr
[
i
];
item
.
y
=
baseY
-
rowCount
*
disY
;
item
.
x
=
lastX
+
disX
;
lastX
=
item
.
x
+
item
.
width
*
item
.
scale
;
item
.
y
=
baseY
-
rowCount
*
disY
;
content
.
addChild
(
itemArr
[
i
]);
lastX
=
item
.
x
+
item
.
width
*
item
.
scale
;
const
tempW
=
Math
.
abs
(
item
.
x
+
disX
+
item
.
width
/
2
*
item
.
scale
);
content
.
addChild
(
itemArr
[
i
]);
content
.
width
=
lastX
-
item
.
width
/
2
*
item
.
scaleX
+
disX
*
2
;
const
tempW
=
Math
.
abs
(
item
.
x
+
disX
+
item
.
width
/
2
*
item
.
scale
);
rowCount
++
;
content
.
width
=
lastX
-
item
.
width
/
2
*
item
.
scaleX
+
disX
*
2
;
if
(
rowCount
>=
row
)
{
rowCount
=
0
;
rowCount
++
;
colCount
++
;
if
(
rowCount
>=
row
)
{
}
rowCount
=
0
;
}
colCount
++
;
}
}
}
}
// update (dt) {}
}
// update (dt) {}
}
assets/middleLayer_for_kyxq/script/middleLayer.ts
View file @
4846780e
...
@@ -146,7 +146,6 @@ export default class NewClass extends middleLayerBase {
...
@@ -146,7 +146,6 @@ export default class NewClass extends middleLayerBase {
backPageNode
:
cc
.
Node
=
null
;
// 从绘本里返回的界面
backPageNode
:
cc
.
Node
=
null
;
// 从绘本里返回的界面
exitGame
(
data
?,
isLocalTemplate
=
false
)
{
exitGame
(
data
?,
isLocalTemplate
=
false
)
{
console
.
log
(
"
qsj?????
"
)
if
(
isLocalTemplate
){
if
(
isLocalTemplate
){
// 模板已经放到项目内
// 模板已经放到项目内
this
.
hideTemplateByName
(
data
.
templateName
);
this
.
hideTemplateByName
(
data
.
templateName
);
...
@@ -192,7 +191,11 @@ console.log("qsj?????")
...
@@ -192,7 +191,11 @@ console.log("qsj?????")
return
;
return
;
}
}
// 庆祝画面
// 庆祝画面
this
.
showFinish
();
if
(
this
.
courseIndex
<
this
.
courses
.
length
){
this
.
showFinish
();
}
else
{
this
.
showAllFinish
()
}
}
}
academyArray
=
[];
// 关卡数组
academyArray
=
[];
// 关卡数组
...
@@ -217,128 +220,87 @@ console.log("qsj?????")
...
@@ -217,128 +220,87 @@ console.log("qsj?????")
async
showGold
(
cb
)
{
async
showGold
(
cb
)
{
console
.
log
(
'
in showGold
'
)
console
.
log
(
'
in showGold
'
)
const
goldAnim
=
cc
.
instantiate
(
cc
.
find
(
'
middleLayer/res/anim/
gold_anim
'
));
const
goldAnim
=
cc
.
instantiate
(
cc
.
find
(
'
middleLayer/res/anim/
finish1_ske
'
));
const
particleLayer
=
cc
.
find
(
"
middleLayer/particle
Layer
"
);
const
finishLayer
=
cc
.
find
(
"
middleLayer/finish
Layer
"
);
goldAnim
.
active
=
true
;
goldAnim
.
active
=
true
;
goldAnim
.
parent
=
particle
Layer
;
goldAnim
.
parent
=
finish
Layer
;
particle
Layer
.
active
=
true
;
finish
Layer
.
active
=
true
;
appearAnim
(
particle
Layer
,
0.3
);
appearAnim
(
finish
Layer
,
0.3
);
console
.
log
(
'
goldAnim:
'
,
goldAnim
);
console
.
log
(
'
goldAnim:
'
,
goldAnim
);
await
asyncPlayDragonBoneAnimation
(
goldAnim
,
'
three
'
,
1
,
null
);
await
asyncPlayDragonBoneAnimation
(
goldAnim
,
'
newAnimation
'
,
1
,
null
);
disappearAnim
(
goldAnim
,
1
);
disappearAnim
(
goldAnim
,
1
);
disappearAnim
(
particle
Layer
,
1
,
()
=>
{
disappearAnim
(
finish
Layer
,
1
,
()
=>
{
particle
Layer
.
active
=
false
;
finish
Layer
.
active
=
false
;
});
});
cb
();
cb
&&
cb
();
}
}
async
showFinish
()
{
async
showFinish
()
{
console
.
log
(
'
in 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
.
active
=
true
;
finishAnim
.
y
=
-
100
;
const
finishLayer
=
cc
.
find
(
"
middleLayer/finishLayer
"
)
finishLayer
.
addChild
(
finishAnim
,
2
);
finishLayer
.
active
=
true
;
const
bgFinish
=
getSprNode
(
"
bg_finish
"
);
await
asyncPlayDragonBoneAnimation
(
finishAnim
,
'
newAnimation
'
,
1
,
null
);
finishAnim
.
addChild
(
bgFinish
);
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
"
);
const
nextBtn
=
cc
.
find
(
'
middleLayer/res/img/btn_next
'
);
labelLayer
.
addChild
(
labelIcon
);
nextBtn
.
parent
=
finishLayer
labelIcon
.
y
=
10
;
labelIcon
.
anchorX
=
0
;
const
labelNode2
=
new
cc
.
Node
();
const
hideFinish
=
()
=>
{
const
label2
=
labelNode2
.
addComponent
(
cc
.
Label
);
nextBtn
.
parent
=
cc
.
find
(
"
middleLayer/res/img
"
)
label2
.
string
=
`x
${
this
.
golds
?
this
.
golds
.
total
:
0
}
`
;
replayBtn
.
parent
=
cc
.
find
(
"
middleLayer/res/img
"
)
labelLayer
.
addChild
(
labelNode2
);
finishLayer
.
removeChild
(
finishAnim
);
labelNode2
.
anchorX
=
0
;
finishLayer
.
active
=
false
;
}
const
distance
=
10
;
replayBtn
.
on
(
'
touchstart
'
,
()
=>
{
setTimeout
(()
=>
{
console
.
log
(
"
replayBtn
"
)
labelLayer
.
width
=
labelNode
.
width
+
labelIcon
.
width
+
labelNode2
.
width
+
distance
*
2
;
hideFinish
();
labelLayer
.
x
=
-
labelLayer
.
width
/
2
;
this
.
loadOnlineCourseWare
(
this
.
courseItem
.
course_id
,
null
,
null
);
labelIcon
.
x
=
distance
+
labelNode
.
width
;
})
labelNode2
.
x
=
labelIcon
.
x
+
labelIcon
.
width
+
distance
;
},
1
);
nextBtn
.
on
(
"
touchstart
"
,
()
=>
{
console
.
log
(
"
nextBtn
"
)
hideFinish
();
this
.
goNextCross
();
})
}
bgFinish
.
addChild
(
labelLayer
);
async
showAllFinish
()
{
appearAnim
(
labelLayer
,
0.3
);
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
.
addChild
(
finishAnim
,
2
);
finishLayer
.
active
=
true
;
finishLayer
.
active
=
true
;
await
asyncPlayDragonBoneAnimation
(
finishAnim
,
'
newAnimation
'
,
1
,
null
);
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
,
'
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
=
()
=>
{
const
hideFinish
=
()
=>
{
finishLayer
.
removeChild
(
xBtn
);
exitBtn
.
parent
=
cc
.
find
(
"
middleLayer/res/img
"
)
\
finishLayer
.
removeChild
(
nextBtn
);
finishLayer
.
removeChild
(
replayBtn
);
finishLayer
.
removeChild
(
finishLight
);
finishLayer
.
removeChild
(
finishAnim
);
finishLayer
.
removeChild
(
finishAnim
);
finishLayer
.
active
=
false
;
finishLayer
.
active
=
false
;
}
}
replayBtn
.
on
(
'
touchstart
'
,
()
=>
{
exitBtn
.
on
(
"
touchstart
"
,
()
=>
{
hideFinish
();
console
.
log
(
"
exitBtn
"
)
this
.
loadOnlineCourseWare
(
this
.
courseItem
.
course_id
,
null
,
null
);
})
nextBtn
.
on
(
"
touchstart
"
,
()
=>
{
hideFinish
();
hideFinish
();
this
.
goNextCross
();
this
.
exitGame
()
})
})
xBtn
.
on
(
"
touchstart
"
,
()
=>
{
hideFinish
();
this
.
exitGame
();
})
appearAnim
(
replayBtn
);
appearAnim
(
nextBtn
);
appearAnim
(
xBtn
);
}
}
reWriteAir
()
{
reWriteAir
()
{
...
...
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