Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
duiduipeng
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
duiduipeng
Commits
ef269320
Commit
ef269320
authored
Apr 26, 2022
by
章红平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
a96c0c79
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
369 additions
and
260 deletions
+369
-260
duiduipeng.fire
assets/duiduipeng/scene/duiduipeng.fire
+284
-220
duiduipeng.ts
assets/duiduipeng/scene/duiduipeng.ts
+69
-33
MyCocosSceneComponent.ts
assets/duiduipeng/script/MyCocosSceneComponent.ts
+13
-1
util.ts
assets/duiduipeng/script/util.ts
+3
-6
No files found.
assets/duiduipeng/scene/duiduipeng.fire
View file @
ef269320
...
...
@@ -78,19 +78,19 @@
"__id__": 9
},
{
"__id__": 11
5
"__id__": 11
7
}
],
"_active": true,
"_components": [
{
"__id__": 1
39
"__id__": 1
41
},
{
"__id__": 14
0
"__id__": 14
2
},
{
"__id__": 14
1
"__id__": 14
3
}
],
"_prefab": null,
...
...
@@ -443,22 +443,22 @@
"__id__": 10
},
{
"__id__":
29
"__id__":
31
},
{
"__id__": 8
5
"__id__": 8
7
},
{
"__id__": 8
7
"__id__": 8
9
},
{
"__id__": 10
0
"__id__": 10
2
}
],
"_active": true,
"_components": [
{
"__id__": 11
4
"__id__": 11
6
}
],
"_prefab": null,
...
...
@@ -527,13 +527,13 @@
"__id__": 24
},
{
"__id__": 2
6
"__id__": 2
7
}
],
"_active": true,
"_components": [
{
"__id__":
28
"__id__":
30
}
],
"_prefab": null,
...
...
@@ -1246,6 +1246,9 @@
"_components": [
{
"__id__": 25
},
{
"__id__": 26
}
],
"_prefab": null,
...
...
@@ -1328,6 +1331,35 @@
"_atlas": null,
"_id": "8cTouH9nVPN7PUyD+esZ4V"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"alignMode": 1,
"_target": {
"__id__": 2
},
"_alignFlags": 9,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "1eMnK9sURMVbzNmGZPW10D"
},
{
"__type__": "cc.Node",
"_name": "bg_right",
...
...
@@ -1339,7 +1371,10 @@
"_active": true,
"_components": [
{
"__id__": 27
"__id__": 28
},
{
"__id__": 29
}
],
"_prefab": null,
...
...
@@ -1395,7 +1430,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
6
"__id__": 2
7
},
"_enabled": true,
"_materials": [
...
...
@@ -1422,6 +1457,35 @@
"_atlas": null,
"_id": "ab8y+TqwNJZaAZ1ItrKbF9"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"alignMode": 1,
"_target": {
"__id__": 2
},
"_alignFlags": 33,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 656,
"_originalHeight": 0,
"_id": "7adgi3qitA/bZzWNT7xQrq"
},
{
"__type__": "cc.Widget",
"_name": "",
...
...
@@ -1460,19 +1524,19 @@
},
"_children": [
{
"__id__": 3
0
"__id__": 3
2
},
{
"__id__": 4
1
"__id__": 4
3
},
{
"__id__": 5
2
"__id__": 5
4
},
{
"__id__": 6
3
"__id__": 6
5
},
{
"__id__": 7
4
"__id__": 7
6
}
],
"_active": true,
...
...
@@ -1530,23 +1594,23 @@
"_name": "card",
"_objFlags": 512,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [
{
"__id__": 3
1
"__id__": 3
3
},
{
"__id__": 3
4
"__id__": 3
6
},
{
"__id__": 3
7
"__id__": 3
9
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 4
0
"__id__": 4
2
},
"_opacity": 255,
"_color": {
...
...
@@ -1600,17 +1664,17 @@
"_name": "bg_card",
"_objFlags": 0,
"_parent": {
"__id__": 3
0
"__id__": 3
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
2
"__id__": 3
4
}
],
"_prefab": {
"__id__": 3
3
"__id__": 3
5
},
"_opacity": 255,
"_color": {
...
...
@@ -1664,7 +1728,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
1
"__id__": 3
3
},
"_enabled": true,
"_materials": [
...
...
@@ -1694,7 +1758,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 3
0
"__id__": 3
2
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -1707,17 +1771,17 @@
"_name": "bg_crad-back",
"_objFlags": 0,
"_parent": {
"__id__": 3
0
"__id__": 3
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
5
"__id__": 3
7
}
],
"_prefab": {
"__id__": 3
6
"__id__": 3
8
},
"_opacity": 255,
"_color": {
...
...
@@ -1771,7 +1835,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
4
"__id__": 3
6
},
"_enabled": true,
"_materials": [
...
...
@@ -1801,7 +1865,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 3
0
"__id__": 3
2
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -1814,17 +1878,17 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 3
0
"__id__": 3
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
38
"__id__":
40
}
],
"_prefab": {
"__id__":
39
"__id__":
41
},
"_opacity": 255,
"_color": {
...
...
@@ -1878,7 +1942,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
7
"__id__": 3
9
},
"_enabled": true,
"_materials": [
...
...
@@ -1906,7 +1970,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 3
0
"__id__": 3
2
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -1917,7 +1981,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 3
0
"__id__": 3
2
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -1930,23 +1994,23 @@
"_name": "card",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [
{
"__id__": 4
2
"__id__": 4
4
},
{
"__id__": 4
5
"__id__": 4
7
},
{
"__id__":
48
"__id__":
50
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 5
1
"__id__": 5
3
},
"_opacity": 255,
"_color": {
...
...
@@ -2000,17 +2064,17 @@
"_name": "bg_card",
"_objFlags": 0,
"_parent": {
"__id__": 4
1
"__id__": 4
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
3
"__id__": 4
5
}
],
"_prefab": {
"__id__": 4
4
"__id__": 4
6
},
"_opacity": 255,
"_color": {
...
...
@@ -2064,7 +2128,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
2
"__id__": 4
4
},
"_enabled": true,
"_materials": [
...
...
@@ -2094,7 +2158,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 4
1
"__id__": 4
3
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -2107,17 +2171,17 @@
"_name": "bg_crad-back",
"_objFlags": 0,
"_parent": {
"__id__": 4
1
"__id__": 4
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
6
"__id__": 4
8
}
],
"_prefab": {
"__id__": 4
7
"__id__": 4
9
},
"_opacity": 255,
"_color": {
...
...
@@ -2171,7 +2235,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
5
"__id__": 4
7
},
"_enabled": true,
"_materials": [
...
...
@@ -2201,7 +2265,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 4
1
"__id__": 4
3
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -2214,17 +2278,17 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 4
1
"__id__": 4
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
49
"__id__":
51
}
],
"_prefab": {
"__id__": 5
0
"__id__": 5
2
},
"_opacity": 255,
"_color": {
...
...
@@ -2278,7 +2342,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
48
"__id__":
50
},
"_enabled": true,
"_materials": [
...
...
@@ -2306,7 +2370,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 4
1
"__id__": 4
3
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -2317,7 +2381,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 4
1
"__id__": 4
3
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -2330,23 +2394,23 @@
"_name": "card",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [
{
"__id__": 5
3
"__id__": 5
5
},
{
"__id__": 5
6
"__id__": 5
8
},
{
"__id__":
59
"__id__":
61
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 6
2
"__id__": 6
4
},
"_opacity": 255,
"_color": {
...
...
@@ -2400,17 +2464,17 @@
"_name": "bg_card",
"_objFlags": 0,
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
4
"__id__": 5
6
}
],
"_prefab": {
"__id__": 5
5
"__id__": 5
7
},
"_opacity": 255,
"_color": {
...
...
@@ -2464,7 +2528,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
3
"__id__": 5
5
},
"_enabled": true,
"_materials": [
...
...
@@ -2494,7 +2558,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 5
2
"__id__": 5
4
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -2507,17 +2571,17 @@
"_name": "bg_crad-back",
"_objFlags": 0,
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
7
"__id__": 5
9
}
],
"_prefab": {
"__id__":
58
"__id__":
60
},
"_opacity": 255,
"_color": {
...
...
@@ -2571,7 +2635,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
6
"__id__": 5
8
},
"_enabled": true,
"_materials": [
...
...
@@ -2601,7 +2665,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 5
2
"__id__": 5
4
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -2614,17 +2678,17 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
0
"__id__": 6
2
}
],
"_prefab": {
"__id__": 6
1
"__id__": 6
3
},
"_opacity": 255,
"_color": {
...
...
@@ -2678,7 +2742,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
59
"__id__":
61
},
"_enabled": true,
"_materials": [
...
...
@@ -2706,7 +2770,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 5
2
"__id__": 5
4
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -2717,7 +2781,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 5
2
"__id__": 5
4
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -2730,23 +2794,23 @@
"_name": "card",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [
{
"__id__": 6
4
"__id__": 6
6
},
{
"__id__": 6
7
"__id__": 6
9
},
{
"__id__": 7
0
"__id__": 7
2
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 7
3
"__id__": 7
5
},
"_opacity": 255,
"_color": {
...
...
@@ -2800,17 +2864,17 @@
"_name": "bg_card",
"_objFlags": 0,
"_parent": {
"__id__": 6
3
"__id__": 6
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
5
"__id__": 6
7
}
],
"_prefab": {
"__id__": 6
6
"__id__": 6
8
},
"_opacity": 255,
"_color": {
...
...
@@ -2864,7 +2928,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
4
"__id__": 6
6
},
"_enabled": true,
"_materials": [
...
...
@@ -2894,7 +2958,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 6
3
"__id__": 6
5
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -2907,17 +2971,17 @@
"_name": "bg_crad-back",
"_objFlags": 0,
"_parent": {
"__id__": 6
3
"__id__": 6
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
68
"__id__":
70
}
],
"_prefab": {
"__id__":
69
"__id__":
71
},
"_opacity": 255,
"_color": {
...
...
@@ -2971,7 +3035,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
7
"__id__": 6
9
},
"_enabled": true,
"_materials": [
...
...
@@ -3001,7 +3065,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 6
3
"__id__": 6
5
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -3014,17 +3078,17 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 6
3
"__id__": 6
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
1
"__id__": 7
3
}
],
"_prefab": {
"__id__": 7
2
"__id__": 7
4
},
"_opacity": 255,
"_color": {
...
...
@@ -3078,7 +3142,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
0
"__id__": 7
2
},
"_enabled": true,
"_materials": [
...
...
@@ -3106,7 +3170,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 6
3
"__id__": 6
5
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -3117,7 +3181,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 6
3
"__id__": 6
5
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -3130,23 +3194,23 @@
"_name": "card",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [
{
"__id__": 7
5
"__id__": 7
7
},
{
"__id__":
78
"__id__":
80
},
{
"__id__": 8
1
"__id__": 8
3
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 8
4
"__id__": 8
6
},
"_opacity": 255,
"_color": {
...
...
@@ -3200,17 +3264,17 @@
"_name": "bg_card",
"_objFlags": 0,
"_parent": {
"__id__": 7
4
"__id__": 7
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
6
"__id__": 7
8
}
],
"_prefab": {
"__id__": 7
7
"__id__": 7
9
},
"_opacity": 255,
"_color": {
...
...
@@ -3264,7 +3328,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
5
"__id__": 7
7
},
"_enabled": true,
"_materials": [
...
...
@@ -3294,7 +3358,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 7
4
"__id__": 7
6
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -3307,17 +3371,17 @@
"_name": "bg_crad-back",
"_objFlags": 0,
"_parent": {
"__id__": 7
4
"__id__": 7
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
79
"__id__":
81
}
],
"_prefab": {
"__id__": 8
0
"__id__": 8
2
},
"_opacity": 255,
"_color": {
...
...
@@ -3371,7 +3435,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
78
"__id__":
80
},
"_enabled": true,
"_materials": [
...
...
@@ -3401,7 +3465,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 7
4
"__id__": 7
6
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -3414,17 +3478,17 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 7
4
"__id__": 7
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
2
"__id__": 8
4
}
],
"_prefab": {
"__id__": 8
3
"__id__": 8
5
},
"_opacity": 255,
"_color": {
...
...
@@ -3478,7 +3542,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
1
"__id__": 8
3
},
"_enabled": true,
"_materials": [
...
...
@@ -3506,7 +3570,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 7
4
"__id__": 7
6
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -3517,7 +3581,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 7
4
"__id__": 7
6
},
"asset": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -3536,7 +3600,7 @@
"_active": true,
"_components": [
{
"__id__": 8
6
"__id__": 8
8
}
],
"_prefab": null,
...
...
@@ -3592,7 +3656,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
5
"__id__": 8
7
},
"_enabled": true,
"_materials": [
...
...
@@ -3626,19 +3690,19 @@
},
"_children": [
{
"__id__":
88
"__id__":
90
},
{
"__id__": 9
1
"__id__": 9
3
},
{
"__id__": 9
5
"__id__": 9
7
}
],
"_active": true,
"_components": [
{
"__id__":
99
"__id__":
101
}
],
"_prefab": null,
...
...
@@ -3694,16 +3758,16 @@
"_name": "bg",
"_objFlags": 512,
"_parent": {
"__id__": 8
7
"__id__": 8
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
89
"__id__":
91
},
{
"__id__": 9
0
"__id__": 9
2
}
],
"_prefab": null,
...
...
@@ -3759,7 +3823,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
88
"__id__":
90
},
"_enabled": true,
"_materials": [
...
...
@@ -3791,7 +3855,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
88
"__id__":
90
},
"_enabled": true,
"_id": "dbATiTrMtJfJI7qTlsBhf7"
...
...
@@ -3801,17 +3865,17 @@
"_name": "bg_tip",
"_objFlags": 0,
"_parent": {
"__id__": 8
7
"__id__": 8
9
},
"_children": [
{
"__id__": 9
2
"__id__": 9
4
}
],
"_active": true,
"_components": [
{
"__id__": 9
4
"__id__": 9
6
}
],
"_prefab": null,
...
...
@@ -3867,13 +3931,13 @@
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 9
1
"__id__": 9
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
3
"__id__": 9
5
}
],
"_prefab": null,
...
...
@@ -3929,7 +3993,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
2
"__id__": 9
4
},
"_enabled": true,
"_materials": [
...
...
@@ -3964,7 +4028,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
1
"__id__": 9
3
},
"_enabled": true,
"_materials": [
...
...
@@ -3996,16 +4060,16 @@
"_name": "btn_start",
"_objFlags": 0,
"_parent": {
"__id__": 8
7
"__id__": 8
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
6
"__id__": 9
8
},
{
"__id__": 9
7
"__id__": 9
9
}
],
"_prefab": null,
...
...
@@ -4061,7 +4125,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
5
"__id__": 9
7
},
"_enabled": true,
"_materials": [
...
...
@@ -4093,7 +4157,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
5
"__id__": 9
7
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4102,7 +4166,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__":
98
"__id__":
100
}
],
"_N$interactable": true,
...
...
@@ -4175,7 +4239,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
7
"__id__": 8
9
},
"_enabled": true,
"alignMode": 2,
...
...
@@ -4206,13 +4270,13 @@
},
"_children": [
{
"__id__": 10
1
"__id__": 10
3
},
{
"__id__": 10
4
"__id__": 10
6
},
{
"__id__": 1
09
"__id__": 1
11
}
],
"_active": false,
...
...
@@ -4270,16 +4334,16 @@
"_name": "bg",
"_objFlags": 512,
"_parent": {
"__id__": 10
0
"__id__": 10
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
2
"__id__": 10
4
},
{
"__id__": 10
3
"__id__": 10
5
}
],
"_prefab": null,
...
...
@@ -4335,7 +4399,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
1
"__id__": 10
3
},
"_enabled": true,
"_materials": [
...
...
@@ -4367,7 +4431,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
1
"__id__": 10
3
},
"_enabled": true,
"_id": "15/ewr6k9J4oXRIG0miG27"
...
...
@@ -4377,11 +4441,11 @@
"_name": "suc",
"_objFlags": 0,
"_parent": {
"__id__": 10
0
"__id__": 10
2
},
"_children": [
{
"__id__": 10
5
"__id__": 10
7
}
],
"_active": true,
...
...
@@ -4439,16 +4503,16 @@
"_name": "btn_restart",
"_objFlags": 0,
"_parent": {
"__id__": 10
4
"__id__": 10
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
6
"__id__": 10
8
},
{
"__id__": 10
7
"__id__": 10
9
}
],
"_prefab": null,
...
...
@@ -4504,7 +4568,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
5
"__id__": 10
7
},
"_enabled": true,
"_materials": [
...
...
@@ -4536,7 +4600,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
5
"__id__": 10
7
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4545,7 +4609,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 1
08
"__id__": 1
10
}
],
"_N$interactable": true,
...
...
@@ -4618,11 +4682,11 @@
"_name": "fail",
"_objFlags": 0,
"_parent": {
"__id__": 10
0
"__id__": 10
2
},
"_children": [
{
"__id__": 11
0
"__id__": 11
2
}
],
"_active": true,
...
...
@@ -4680,16 +4744,16 @@
"_name": "btn_restart",
"_objFlags": 0,
"_parent": {
"__id__": 1
09
"__id__": 1
11
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 11
1
"__id__": 11
3
},
{
"__id__": 11
2
"__id__": 11
4
}
],
"_prefab": null,
...
...
@@ -4745,7 +4809,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
0
"__id__": 11
2
},
"_enabled": true,
"_materials": [
...
...
@@ -4777,7 +4841,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
0
"__id__": 11
2
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4786,7 +4850,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 11
3
"__id__": 11
5
}
],
"_N$interactable": true,
...
...
@@ -4883,13 +4947,13 @@
},
"_children": [
{
"__id__": 11
6
"__id__": 11
8
},
{
"__id__": 1
19
"__id__": 1
21
},
{
"__id__": 12
6
"__id__": 12
8
}
],
"_active": false,
...
...
@@ -4947,11 +5011,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 11
5
"__id__": 11
7
},
"_children": [
{
"__id__": 11
7
"__id__": 11
9
}
],
"_active": true,
...
...
@@ -5009,13 +5073,13 @@
"_name": "BRLNSDB",
"_objFlags": 512,
"_parent": {
"__id__": 11
6
"__id__": 11
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
18
"__id__": 1
20
}
],
"_prefab": null,
...
...
@@ -5071,7 +5135,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
7
"__id__": 11
9
},
"_enabled": true,
"_materials": [],
...
...
@@ -5102,17 +5166,17 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 11
5
"__id__": 11
7
},
"_children": [
{
"__id__": 120
},
{
"__id__": 122
},
{
"__id__": 124
},
{
"__id__": 126
}
],
"_active": true,
...
...
@@ -5170,13 +5234,13 @@
"_name": "1",
"_objFlags": 0,
"_parent": {
"__id__": 1
19
"__id__": 1
21
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
1
"__id__": 12
3
}
],
"_prefab": null,
...
...
@@ -5232,7 +5296,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
0
"__id__": 12
2
},
"_enabled": true,
"_materials": [],
...
...
@@ -5260,13 +5324,13 @@
"_name": "2",
"_objFlags": 0,
"_parent": {
"__id__": 1
19
"__id__": 1
21
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
3
"__id__": 12
5
}
],
"_prefab": null,
...
...
@@ -5322,7 +5386,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
2
"__id__": 12
4
},
"_enabled": true,
"_materials": [],
...
...
@@ -5350,13 +5414,13 @@
"_name": "3",
"_objFlags": 0,
"_parent": {
"__id__": 1
19
"__id__": 1
21
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
5
"__id__": 12
7
}
],
"_prefab": null,
...
...
@@ -5412,7 +5476,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
4
"__id__": 12
6
},
"_enabled": true,
"_materials": [],
...
...
@@ -5440,12 +5504,9 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 11
5
"__id__": 11
7
},
"_children": [
{
"__id__": 127
},
{
"__id__": 129
},
...
...
@@ -5460,6 +5521,9 @@
},
{
"__id__": 137
},
{
"__id__": 139
}
],
"_active": true,
...
...
@@ -5517,13 +5581,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 12
6
"__id__": 12
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
28
"__id__": 1
30
}
],
"_prefab": null,
...
...
@@ -5579,7 +5643,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
7
"__id__": 12
9
},
"_enabled": true,
"_clip": {
...
...
@@ -5598,13 +5662,13 @@
"_name": "time2",
"_objFlags": 0,
"_parent": {
"__id__": 12
6
"__id__": 12
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
0
"__id__": 13
2
}
],
"_prefab": null,
...
...
@@ -5660,7 +5724,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
29
"__id__": 1
31
},
"_enabled": true,
"_clip": {
...
...
@@ -5679,13 +5743,13 @@
"_name": "time1",
"_objFlags": 0,
"_parent": {
"__id__": 12
6
"__id__": 12
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
2
"__id__": 13
4
}
],
"_prefab": null,
...
...
@@ -5741,7 +5805,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
1
"__id__": 13
3
},
"_enabled": true,
"_clip": {
...
...
@@ -5760,13 +5824,13 @@
"_name": "false",
"_objFlags": 0,
"_parent": {
"__id__": 12
6
"__id__": 12
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
4
"__id__": 13
6
}
],
"_prefab": null,
...
...
@@ -5822,7 +5886,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
3
"__id__": 13
5
},
"_enabled": true,
"_clip": {
...
...
@@ -5841,13 +5905,13 @@
"_name": "true",
"_objFlags": 0,
"_parent": {
"__id__": 12
6
"__id__": 12
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
6
"__id__": 13
8
}
],
"_prefab": null,
...
...
@@ -5903,7 +5967,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
5
"__id__": 13
7
},
"_enabled": true,
"_clip": {
...
...
@@ -5922,13 +5986,13 @@
"_name": "suc",
"_objFlags": 0,
"_parent": {
"__id__": 12
6
"__id__": 12
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
38
"__id__": 1
40
}
],
"_prefab": null,
...
...
@@ -5984,7 +6048,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
7
"__id__": 13
9
},
"_enabled": true,
"_clip": {
...
...
@@ -6051,7 +6115,7 @@
},
"_enabled": true,
"cardParentN": {
"__id__":
29
"__id__":
31
},
"cardP": {
"__uuid__": "a6570908-00fe-45b5-8768-2cbe0ea60744"
...
...
@@ -6060,16 +6124,16 @@
"__id__": 22
},
"tipLabel": {
"__id__": 9
3
"__id__": 9
5
},
"tipN": {
"__id__": 8
7
"__id__": 8
9
},
"countDown": {
"__id__": 8
5
"__id__": 8
7
},
"overN": {
"__id__": 10
0
"__id__": 10
2
},
"_id": "eaTVUpqahPfZeO9+sUI7RP"
}
...
...
assets/duiduipeng/scene/duiduipeng.ts
View file @
ef269320
...
...
@@ -29,6 +29,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
completeNum
=
0
;
@
property
(
cc
.
Node
)
overN
:
cc
.
Node
resultQuesitons
=
[];
// resultData = {
// quesitons:[{
// duration: 107,// 用时多久
// rightPairNumber: 5, // 正确的对数
// wrongPairNumber: 3, // 错误的对数
// totalPairNumber: 6,// 总对数
// }]
// }
...
...
@@ -66,6 +75,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
initData
()
{
this
.
log
(
'
initData:
'
);
// 所有全局变量 默认都是null
//
// this.scheduleOnce(()=>{
this
.
playAudioByUrl
(
this
.
data
.
questionTextAudio
)
// },1)
cc
.
find
(
"
Canvas/uiP/bg_tip
"
).
active
=
true
;
this
.
tittleLabel
.
string
=
this
.
data
.
title
;
this
.
tipLabel
.
string
=
this
.
data
.
questionText
;
...
...
@@ -189,13 +202,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
timeN
.
active
=
false
;
timeN1
.
active
=
true
;
// if(this.gameState=="game"){
if
(
numTime
<=
1
)
{
if
(
numTime
==
1
)
this
.
playLocalAudio
(
"
time1
"
)
}
else
{
this
.
playLocalAudio
(
"
time2
"
)
}
// }else{
if
(
this
.
gameState
==
"
watching
"
)
{
if
(
numTime
==
3
)
this
.
playLocalAudio
(
"
suc
"
)
if
(
numTime
==
1
||
numTime
==
2
||
numTime
==
3
)
{
this
.
countDown
.
active
=
true
;
this
.
countDown
.
stopAllActions
();
...
...
@@ -208,6 +218,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
})
.
start
()
}
}
else
{
if
(
numTime
<=
1
)
{
if
(
numTime
==
1
)
this
.
playLocalAudio
(
"
time1
"
)
}
else
{
this
.
playLocalAudio
(
"
time2
"
)
}
}
// }
...
...
@@ -257,8 +273,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
gameTime
--
;
console
.
log
(
"
gametime=====
"
,
this
.
gameTime
)
if
(
this
.
gameTime
<=
0
)
{
this
.
gameOver
(
false
);
this
.
clearntervals
();
this
.
resultQuesitons
.
push
({
duration
:
this
.
data
.
questions
[
this
.
questionIndex
].
gameTime
-
this
.
gameTime
,
// 用时多久
rightPairNumber
:
this
.
completeNum
,
// 正确的对数
wrongPairNumber
:
this
.
data
.
questions
[
this
.
questionIndex
].
options
.
length
/
2
-
this
.
completeNum
,
// 错误的对数
totalPairNumber
:
this
.
data
.
questions
[
this
.
questionIndex
].
options
.
length
/
2
,
// 总对数
})
if
(
this
.
questionIndex
<
(
this
.
data
.
questions
.
length
-
1
)){
this
.
nextQuestion
();
}
else
{
this
.
gameOver
(
true
)
}
}
this
.
updateTime
();
...
...
@@ -271,16 +297,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
clickNode1
=
node
;
this
.
clickNodeData1
=
data
;
this
.
clickNode1
.
getComponent
(
"
card
"
).
asyncDoFlip
()
this
.
playAudioByUrl
(
this
.
clickNodeData1
.
audio
);
this
.
asyncPlayAudioByUrl
(
this
.
clickNodeData1
.
audio
);
// this.asyncPlayAudioByUrl( this.data.questionTextAudio);
}
else
{
if
(
this
.
clickNode1
==
node
)
{
return
;
// this.
p
layAudioByUrl( this.clickNodeData1.audio);
// this.
asyncP
layAudioByUrl( this.clickNodeData1.audio);
}
else
{
this
.
canTouch
=
false
if
(
this
.
clickNodeData1
.
pairIdx
==
data
.
pairIdx
)
{
Promise
.
all
([
node
.
getComponent
(
"
card
"
).
asyncDoFlip
(),
this
.
p
layAudioByUrl
(
data
.
audio
)])
.
all
([
node
.
getComponent
(
"
card
"
).
asyncDoFlip
(),
this
.
asyncP
layAudioByUrl
(
data
.
audio
)])
.
then
(()
=>
{
Promise
.
all
([
node
.
getComponent
(
"
card
"
).
playDragon
(),
this
.
clickNode1
.
getComponent
(
"
card
"
).
playDragon
(),
this
.
playLocalAudio
(
"
true
"
)])
.
then
(()
=>
{
...
...
@@ -293,18 +321,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
this
.
completeNum
==
this
.
data
.
questions
[
this
.
questionIndex
].
options
.
length
/
2
)
{
console
.
log
(
"
allTrue===
"
)
this
.
clearntervals
();
if
(
this
.
questionIndex
<
(
this
.
data
.
questions
.
length
-
1
)){
this
.
questionIndex
++
this
.
overN
.
active
=
false
;
this
.
initGameData
();
this
.
initCards
();
this
.
tipN
.
active
=
false
;
let
children
=
this
.
cardParentN
.
children
;
for
(
let
i
=
0
;
i
<
children
.
length
;
i
++
)
{
children
[
i
].
getComponent
(
"
card
"
).
asyncDoFlip
(()
=>
{
if
(
i
==
children
.
length
-
1
)
this
.
startWatch
();
this
.
resultQuesitons
.
push
({
duration
:
this
.
data
.
questions
[
this
.
questionIndex
].
gameTime
-
this
.
gameTime
,
// 用时多久
rightPairNumber
:
this
.
completeNum
,
// 正确的对数
wrongPairNumber
:
this
.
data
.
questions
[
this
.
questionIndex
].
options
.
length
/
2
-
this
.
completeNum
,
// 错误的对数
totalPairNumber
:
this
.
data
.
questions
[
this
.
questionIndex
].
options
.
length
/
2
,
// 总对数
})
}
if
(
this
.
questionIndex
<
(
this
.
data
.
questions
.
length
-
1
)){
this
.
nextQuestion
();
}
else
{
this
.
gameOver
(
true
)
}
...
...
@@ -316,7 +340,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
)
}
else
{
Promise
.
all
([
node
.
getComponent
(
"
card
"
).
asyncDoFlip
(),
this
.
p
layAudioByUrl
(
data
.
audio
)])
.
all
([
node
.
getComponent
(
"
card
"
).
asyncDoFlip
(),
this
.
asyncP
layAudioByUrl
(
data
.
audio
)])
.
then
(()
=>
{
Promise
.
all
([
this
.
playLocalAudio
(
"
false
"
)])
.
then
(()
=>
{
...
...
@@ -338,6 +362,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
nextQuestion
(){
this
.
questionIndex
++
this
.
overN
.
active
=
false
;
this
.
initGameData
();
this
.
initCards
();
this
.
tipN
.
active
=
false
;
let
children
=
this
.
cardParentN
.
children
;
for
(
let
i
=
0
;
i
<
children
.
length
;
i
++
)
{
children
[
i
].
getComponent
(
"
card
"
).
asyncDoFlip
(()
=>
{
if
(
i
==
children
.
length
-
1
)
this
.
startWatch
();
})
}
};
clearntervals
()
{
// cc.find("Canvas/uiP/top/timeN").active=false;
if
(
this
.
watchInterval
)
{
...
...
@@ -348,21 +385,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
gameOver
(
isSuc
){
if
(
isSuc
){
this
.
questionIndex
=
0
;
this
.
overN
.
active
=
true
;
let
sucN
=
this
.
overN
.
getChildByName
(
"
suc
"
)
let
failN
=
this
.
overN
.
getChildByName
(
"
fail
"
)
if
(
isSuc
){
sucN
.
active
=
true
;
failN
.
active
=
false
;
this
.
playAudioByUrl
(
"
suc
"
)
onHomeworkFinish
();
}
else
{
sucN
.
active
=
false
;
failN
.
active
=
true
;
// this.asyncPlayAudioByUrl("suc")
onHomeworkFinish
({
quesitons
:
this
.
resultQuesitons
});
}
}
playLocalAudio
(
audioName
)
{
const
audio
=
cc
.
find
(
`Canvas/res/audio/
${
audioName
}
`
).
getComponent
(
cc
.
AudioSource
);
...
...
@@ -374,6 +409,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
})
}
onClickRestart
(){
this
.
resultQuesitons
=
[]
this
.
overN
.
active
=
false
;
this
.
initGameData
();
this
.
initCards
();
...
...
@@ -443,7 +479,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// iconNode.y = iconNode.parent.height / 2 - 10;
// iconNode.on(cc.Node.EventType.TOUCH_START, () => {
// this.
p
layAudioByUrl(this.data.audio_url);
// this.
asyncP
layAudioByUrl(this.data.audio_url);
// })
// }
...
...
assets/duiduipeng/script/MyCocosSceneComponent.ts
View file @
ef269320
...
...
@@ -167,8 +167,9 @@ export class MyCocosSceneComponent extends cc.Component {
})
}
p
layAudioByUrl
(
audio_url
,
cb
=
null
)
{
asyncP
layAudioByUrl
(
audio_url
,
cb
=
null
)
{
if
(
audio_url
)
{
console
.
log
(
"
audio_url===
"
,
audio_url
)
return
new
Promise
((
resole
,
reject
)
=>
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
cc
.
audioEngine
.
stopAll
();
...
...
@@ -185,4 +186,15 @@ export class MyCocosSceneComponent extends cc.Component {
cb
&&
cb
();
}
}
playAudioByUrl
(
audio_url
,)
{
if
(
audio_url
)
{
console
.
log
(
"
audio_url===
"
,
audio_url
)
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
cc
.
audioEngine
.
stopAll
();
console
.
log
(
"
audioClip=====
"
,
audioClip
)
cc
.
audioEngine
.
playEffect
(
audioClip
,
false
);
console
.
log
(
"
audioClip2=====
"
,
audioClip
)
})
}
}
}
\ No newline at end of file
assets/duiduipeng/script/util.ts
View file @
ef269320
...
...
@@ -410,15 +410,12 @@ export function showTrebleFirework(baseNode, rabbonList) {
showFireworks
(
left
);
showFireworks
(
right
);
}
export
function
onHomeworkFinish
()
{
export
function
onHomeworkFinish
(
data
)
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
if
(
middleLayerComponent
.
role
==
'
student
'
)
{
middleLayerComponent
.
onHomeworkFinish
(()
=>
{
});
}
middleLayerComponent
.
onHomeworkFinish
(()
=>
{
},
data
);
}
else
{
console
.
log
(
'
onHomeworkFinish
'
);
console
.
log
(
'
onHomeworkFinish
:
'
+
JSON
.
stringify
(
data
)
);
}
}
\ 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