Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dfzx_cocos_dds
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
dfzx_cocos_dds
Commits
2f224257
Commit
2f224257
authored
Mar 15, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bugs
parent
618dfdb1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
271 additions
and
101 deletions
+271
-101
et_13.fire
play/assets/et_13/scene/et_13.fire
+167
-70
et_13.js
play/assets/et_13/script/et_13.js
+55
-22
util.js
play/assets/et_13/script/util.js
+13
-9
icon_bigstar.png
play/assets/et_13/texture/icon_bigstar.png
+0
-0
icon_bigstar.png.meta
play/assets/et_13/texture/icon_bigstar.png.meta
+36
-0
No files found.
play/assets/et_13/scene/et_13.fire
View file @
2f224257
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"__id__": 2
"__id__": 2
},
},
{
{
"__id__": 7
0
"__id__": 7
2
}
}
],
],
"_active": false,
"_active": false,
...
@@ -96,13 +96,13 @@
...
@@ -96,13 +96,13 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 6
7
"__id__": 6
9
},
},
{
{
"__id__":
68
"__id__":
70
},
},
{
{
"__id__":
69
"__id__":
71
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1063,13 +1063,13 @@
...
@@ -1063,13 +1063,13 @@
"__id__": 25
"__id__": 25
},
},
{
{
"__id__": 4
6
"__id__": 4
8
},
},
{
{
"__id__":
49
"__id__":
51
},
},
{
{
"__id__": 5
2
"__id__": 5
4
}
}
],
],
"_active": true,
"_active": true,
...
@@ -1159,6 +1159,9 @@
...
@@ -1159,6 +1159,9 @@
},
},
{
{
"__id__": 44
"__id__": 44
},
{
"__id__": 46
}
}
],
],
"_active": true,
"_active": true,
...
@@ -1965,7 +1968,7 @@
...
@@ -1965,7 +1968,7 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
hole_2
",
"_name": "
icon_bigstar
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 25
"__id__": 25
...
@@ -1986,6 +1989,100 @@
...
@@ -1986,6 +1989,100 @@
"b": 255,
"b": 255,
"a": 255
"a": 255
},
},
"_contentSize": {
"__type__": "cc.Size",
"width": 278,
"height": 275
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
300.959,
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": "31ELgkCyJLDo+xA8HORNic"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "34d97abe-f3fb-4599-9d5a-55e730f6d897"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "698kruQypGSLxixeCT5p1A"
},
{
"__type__": "cc.Node",
"_name": "hole_2",
"_objFlags": 0,
"_parent": {
"__id__": 25
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 260,
"width": 260,
...
@@ -2030,7 +2127,7 @@
...
@@ -2030,7 +2127,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 4
2
"__id__": 4
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2068,7 +2165,7 @@
...
@@ -2068,7 +2165,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 4
5
"__id__": 4
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2124,7 +2221,7 @@
...
@@ -2124,7 +2221,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 4
4
"__id__": 4
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2160,7 +2257,7 @@
...
@@ -2160,7 +2257,7 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 4
7
"__id__": 4
9
}
}
],
],
"_active": true,
"_active": true,
...
@@ -2218,13 +2315,13 @@
...
@@ -2218,13 +2315,13 @@
"_name": "Berlin Sans FB",
"_name": "Berlin Sans FB",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 4
6
"__id__": 4
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
48
"__id__":
50
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2280,7 +2377,7 @@
...
@@ -2280,7 +2377,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 4
7
"__id__": 4
9
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2319,7 +2416,7 @@
...
@@ -2319,7 +2416,7 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 5
0
"__id__": 5
2
}
}
],
],
"_active": true,
"_active": true,
...
@@ -2377,13 +2474,13 @@
...
@@ -2377,13 +2474,13 @@
"_name": "star",
"_name": "star",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
49
"__id__":
51
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 5
1
"__id__": 5
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2439,7 +2536,7 @@
...
@@ -2439,7 +2536,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
0
"__id__": 5
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2482,9 +2579,6 @@
...
@@ -2482,9 +2579,6 @@
"__id__": 24
"__id__": 24
},
},
"_children": [
"_children": [
{
"__id__": 53
},
{
{
"__id__": 55
"__id__": 55
},
},
...
@@ -2502,6 +2596,9 @@
...
@@ -2502,6 +2596,9 @@
},
},
{
{
"__id__": 65
"__id__": 65
},
{
"__id__": 67
}
}
],
],
"_active": true,
"_active": true,
...
@@ -2559,13 +2656,13 @@
...
@@ -2559,13 +2656,13 @@
"_name": "end",
"_name": "end",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 5
4
"__id__": 5
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2621,7 +2718,7 @@
...
@@ -2621,7 +2718,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
3
"__id__": 5
5
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -2640,13 +2737,13 @@
...
@@ -2640,13 +2737,13 @@
"_name": "wrong",
"_name": "wrong",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 5
6
"__id__": 5
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2702,7 +2799,7 @@
...
@@ -2702,7 +2799,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
5
"__id__": 5
7
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -2721,13 +2818,13 @@
...
@@ -2721,13 +2818,13 @@
"_name": "right",
"_name": "right",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
58
"__id__":
60
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2783,7 +2880,7 @@
...
@@ -2783,7 +2880,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
7
"__id__": 5
9
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -2802,13 +2899,13 @@
...
@@ -2802,13 +2899,13 @@
"_name": "appear",
"_name": "appear",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 6
0
"__id__": 6
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2864,7 +2961,7 @@
...
@@ -2864,7 +2961,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
59
"__id__":
61
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -2883,13 +2980,13 @@
...
@@ -2883,13 +2980,13 @@
"_name": "star",
"_name": "star",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 6
2
"__id__": 6
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2945,7 +3042,7 @@
...
@@ -2945,7 +3042,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
1
"__id__": 6
3
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -2964,13 +3061,13 @@
...
@@ -2964,13 +3061,13 @@
"_name": "btn",
"_name": "btn",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 6
4
"__id__": 6
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3026,7 +3123,7 @@
...
@@ -3026,7 +3123,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
3
"__id__": 6
5
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3045,13 +3142,13 @@
...
@@ -3045,13 +3142,13 @@
"_name": "big_star",
"_name": "big_star",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
2
"__id__": 5
4
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 6
6
"__id__": 6
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3107,7 +3204,7 @@
...
@@ -3107,7 +3204,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
5
"__id__": 6
7
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3185,9 +3282,6 @@
...
@@ -3185,9 +3282,6 @@
"__id__": 1
"__id__": 1
},
},
"_children": [
"_children": [
{
"__id__": 71
},
{
{
"__id__": 73
"__id__": 73
},
},
...
@@ -3208,6 +3302,9 @@
...
@@ -3208,6 +3302,9 @@
},
},
{
{
"__id__": 85
"__id__": 85
},
{
"__id__": 87
}
}
],
],
"_active": false,
"_active": false,
...
@@ -3265,13 +3362,13 @@
...
@@ -3265,13 +3362,13 @@
"_name": "sahua",
"_name": "sahua",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 7
0
"__id__": 7
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 7
2
"__id__": 7
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3327,7 +3424,7 @@
...
@@ -3327,7 +3424,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
1
"__id__": 7
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3359,13 +3456,13 @@
...
@@ -3359,13 +3456,13 @@
"_name": "sahua",
"_name": "sahua",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 7
0
"__id__": 7
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 7
4
"__id__": 7
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3421,7 +3518,7 @@
...
@@ -3421,7 +3518,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
3
"__id__": 7
5
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3453,13 +3550,13 @@
...
@@ -3453,13 +3550,13 @@
"_name": "sahua",
"_name": "sahua",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 7
0
"__id__": 7
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 7
6
"__id__": 7
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3515,7 +3612,7 @@
...
@@ -3515,7 +3612,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
5
"__id__": 7
7
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3547,13 +3644,13 @@
...
@@ -3547,13 +3644,13 @@
"_name": "sahua",
"_name": "sahua",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 7
0
"__id__": 7
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
78
"__id__":
80
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3609,7 +3706,7 @@
...
@@ -3609,7 +3706,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
7
"__id__": 7
9
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3641,13 +3738,13 @@
...
@@ -3641,13 +3738,13 @@
"_name": "sahua",
"_name": "sahua",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 7
0
"__id__": 7
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
0
"__id__": 8
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3703,7 +3800,7 @@
...
@@ -3703,7 +3800,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
79
"__id__":
81
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3735,13 +3832,13 @@
...
@@ -3735,13 +3832,13 @@
"_name": "sahua",
"_name": "sahua",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 7
0
"__id__": 7
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
2
"__id__": 8
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3797,7 +3894,7 @@
...
@@ -3797,7 +3894,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
1
"__id__": 8
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3829,13 +3926,13 @@
...
@@ -3829,13 +3926,13 @@
"_name": "sahua",
"_name": "sahua",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 7
0
"__id__": 7
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
4
"__id__": 8
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3891,7 +3988,7 @@
...
@@ -3891,7 +3988,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
3
"__id__": 8
5
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3923,13 +4020,13 @@
...
@@ -3923,13 +4020,13 @@
"_name": "sahua",
"_name": "sahua",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 7
0
"__id__": 7
2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
6
"__id__": 8
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3985,7 +4082,7 @@
...
@@ -3985,7 +4082,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
5
"__id__": 8
7
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
...
play/assets/et_13/script/et_13.js
View file @
2f224257
...
@@ -99,7 +99,7 @@ cc.Class({
...
@@ -99,7 +99,7 @@ cc.Class({
},
},
getDefaultData
()
{
getDefaultData
()
{
const
dataJson
=
'
{"groupArr":[{"ques":"","optionArr":[{"type":"text","isRight":"1","text":"
aaa"},{"type":"text","isRight":"0","text":"bbb"},{"type":"text","isRight":"0","text":"ccc
"}]}]}
'
;
const
dataJson
=
'
{"groupArr":[{"ques":"","optionArr":[{"type":"text","isRight":"1","text":"
pad"},{"type":"text","isRight":"0","text":"bdpq"},{"type":"text","isRight":"0","text":"ooo"}]},{"ques":"","optionArr":[{"type":"text","isRight":"1","text":"pad"},{"type":"text","isRight":"0","text":"ggff"},{"type":"text","isRight":"0","text":"OOO
"}]}]}
'
;
const
data1
=
JSON
.
parse
(
dataJson
);
const
data1
=
JSON
.
parse
(
dataJson
);
return
data1
;
return
data1
;
},
},
...
@@ -249,7 +249,7 @@ cc.Class({
...
@@ -249,7 +249,7 @@ cc.Class({
bigStarArr
:
null
,
bigStarArr
:
null
,
initStar
()
{
initStar
()
{
const
gArr
=
this
.
data
.
groupArr
;
const
gArr
=
this
.
data
.
groupArr
;
if
(
gArr
.
length
<
1
)
{
if
(
gArr
.
length
<
=
1
)
{
return
;
return
;
}
}
...
@@ -269,6 +269,11 @@ cc.Class({
...
@@ -269,6 +269,11 @@ cc.Class({
starTop
.
active
=
false
;
starTop
.
active
=
false
;
starBg
.
star
=
starTop
;
starBg
.
star
=
starTop
;
const
starBig
=
getSprNode
(
'
icon_bigstar
'
);
starBg
.
addChild
(
starBig
);
starBig
.
active
=
false
;
starBg
.
starBig
=
starBig
;
this
.
bigStarArr
.
push
(
starBg
);
this
.
bigStarArr
.
push
(
starBg
);
}
}
},
},
...
@@ -322,8 +327,7 @@ cc.Class({
...
@@ -322,8 +327,7 @@ cc.Class({
},
},
startBtnClicked
()
{
startBtnClicked
()
{
this
.
showQuestion
();
this
.
showQuestion
(()
=>
{
playAudio
(
this
.
btnClip
,
()
=>
{
cc
.
tween
(
this
)
cc
.
tween
(
this
)
.
delay
(
0.3
)
.
delay
(
0.3
)
.
call
(()
=>
{
.
call
(()
=>
{
...
@@ -331,6 +335,7 @@ cc.Class({
...
@@ -331,6 +335,7 @@ cc.Class({
})
})
.
start
();
.
start
();
});
});
playAudio
(
this
.
btnClip
);
},
},
restartBtnClicked
()
{
restartBtnClicked
()
{
...
@@ -341,6 +346,9 @@ cc.Class({
...
@@ -341,6 +346,9 @@ cc.Class({
},
},
hideBigStar
()
{
hideBigStar
()
{
if
(
!
this
.
bigStarArr
)
{
return
;
}
for
(
let
i
=
0
;
i
<
this
.
bigStarArr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
bigStarArr
.
length
;
i
++
)
{
cc
.
tween
(
this
.
bigStarArr
[
i
].
star
)
cc
.
tween
(
this
.
bigStarArr
[
i
].
star
)
.
to
(
0.5
,
{
scale
:
0
},
{
easing
:
'
cubicOut
'
})
.
to
(
0.5
,
{
scale
:
0
},
{
easing
:
'
cubicOut
'
})
...
@@ -353,18 +361,22 @@ cc.Class({
...
@@ -353,18 +361,22 @@ cc.Class({
const
btn
=
cc
.
find
(
'
Canvas/btn_laba
'
)
const
btn
=
cc
.
find
(
'
Canvas/btn_laba
'
)
btn
.
addComponent
(
cc
.
Button
);
btn
.
addComponent
(
cc
.
Button
);
btn
.
on
(
'
click
'
,
()
=>
{
btn
.
on
(
'
click
'
,
()
=>
{
this
.
showQuestion
();
playAudio
(
this
.
btnClip
,
()
=>
{
playAudio
(
this
.
btnClip
);
this
.
showQuestion
();
});
})
})
},
},
showQuestion
()
{
showQuestion
(
func
)
{
var
anim
=
cc
.
find
(
'
Canvas/btn_laba
'
).
getComponent
(
cc
.
Animation
);
var
anim
=
cc
.
find
(
'
Canvas/btn_laba
'
).
getComponent
(
cc
.
Animation
);
anim
.
play
();
anim
.
play
();
playAudioByUrl
(
this
.
curGroup
.
audio_url
,
()
=>
{
playAudioByUrl
(
this
.
curGroup
.
audio_url
,
()
=>
{
anim
.
stop
();
anim
.
stop
();
if
(
func
&&
typeof
(
func
)
==
'
function
'
)
{
func
();
}
});
});
...
@@ -604,35 +616,54 @@ cc.Class({
...
@@ -604,35 +616,54 @@ cc.Class({
},
},
showBigStar
()
{
showBigStar
()
{
if
(
!
this
.
bigStarArr
||
this
.
bigStarArr
.
length
<=
0
)
{
this
.
checkGameEnd
();
return
;
}
const
bigStarBg
=
this
.
bigStarArr
[
this
.
groupIndex
];
const
bigStarBg
=
this
.
bigStarArr
[
this
.
groupIndex
];
const
star
=
bigStarBg
.
star
;
const
star
=
bigStarBg
.
star
;
star
.
active
=
true
;
star
.
active
=
true
;
star
.
opacity
=
0
;
star
.
opacity
=
0
;
star
.
scale
=
7
*
this
.
_mapScaleMin
;
star
.
scale
=
1
;
star
.
rotation
=
0
;
star
.
angle
=
0
;
const
canvas
=
cc
.
find
(
'
Canvas
'
);
const
starBig
=
bigStarBg
.
starBig
;
starBig
.
active
=
true
;
starBig
.
scale
=
1
;
starBig
.
angle
=
-
90
;
const
pos
=
star
.
parent
.
convertToNodeSpaceAR
(
canvas
.
convertToWorldSpaceAR
(
cc
.
v2
(
0
,
-
canvas
.
height
/
2
)));
const
canvas
=
cc
.
find
(
'
Canvas
'
);
const
startPos
=
star
.
parent
.
convertToNodeSpaceAR
(
canvas
.
convertToWorldSpaceAR
(
cc
.
v2
(
0
,
-
canvas
.
height
/
2
)));
star
.
x
=
pos
.
x
;
starBig
.
x
=
startPos
.
x
;
star
.
y
=
pos
.
y
;
starBig
.
y
=
startPos
.
y
;
star
.
x
=
startPos
.
x
;
star
.
y
=
startPos
.
y
;
const
time
=
1
;
const
time
=
1
;
cc
.
tween
(
star
)
cc
.
tween
(
star
)
.
delay
(
time
/
3
)
.
to
(
time
,
{
x
:
0
},
{
easing
:
'
quadIn
'
})
.
to
(
time
*
2
/
3
,
{
x
:
0
})
.
start
();
.
start
();
cc
.
tween
(
star
)
cc
.
tween
(
star
)
.
to
(
time
,
{
y
:
0
},
{
easing
:
'
quadInOut
'
})
.
to
(
time
,
{
angle
:
-
720
})
.
start
();
.
start
();
cc
.
tween
(
star
)
cc
.
tween
(
star
)
.
to
(
time
,
{
scale
:
1
,
opacity
:
255
,
rotation
:
360
},
{
easing
:
'
quadOut
'
})
.
to
(
time
,
{
y
:
0
,
scale
:
1
,
opacity
:
255
},
{
easing
:
'
quadOut
'
})
.
call
(()
=>
{
.
call
(()
=>
{
this
.
checkGameEnd
();
this
.
checkGameEnd
();
})
})
.
start
();
.
start
();
cc
.
tween
(
starBig
)
.
to
(
time
,
{
x
:
0
},
{
easing
:
'
quadIn
'
})
.
start
();
cc
.
tween
(
starBig
)
.
to
(
time
,
{
angle
:
-
720
-
90
})
.
start
();
cc
.
tween
(
starBig
)
.
to
(
time
,
{
y
:
0
,
scale
:
0
},
{
easing
:
'
quadOut
'
})
.
start
();
playAudio
(
this
.
bigStarClip
);
playAudio
(
this
.
bigStarClip
);
},
},
...
@@ -645,11 +676,13 @@ cc.Class({
...
@@ -645,11 +676,13 @@ cc.Class({
return
;
return
;
}
}
await
asyncDelay
(
3
);
await
asyncDelay
(
1
);
this
.
initCurGroup
();
this
.
initCurGroup
();
this
.
showOnePenguin
();
this
.
showQuestion
();
this
.
showQuestion
(()
=>
{
this
.
showOnePenguin
();
});
},
},
gameEnd
()
{
gameEnd
()
{
...
@@ -741,7 +774,7 @@ cc.Class({
...
@@ -741,7 +774,7 @@ cc.Class({
cc
.
Color
.
fromHEX
(
color
,
'
c1431d
'
);
cc
.
Color
.
fromHEX
(
color
,
'
c1431d
'
);
labelNode
.
color
=
color
;
labelNode
.
color
=
color
;
labelNode
.
y
=
5
;
labelNode
.
y
=
-
2.
5
;
textPanel
.
label
=
label
;
textPanel
.
label
=
label
;
...
...
play/assets/et_13/script/util.js
View file @
2f224257
...
@@ -72,7 +72,7 @@ export function setSprNodeMaxLen(sprNode, maxW, maxH) {
...
@@ -72,7 +72,7 @@ export function setSprNodeMaxLen(sprNode, maxW, maxH) {
export
function
getSpriteFrimeByUrl
(
url
,
cb
)
{
export
function
getSpriteFrimeByUrl
(
url
,
cb
)
{
cc
.
loader
.
load
({
url
},
(
err
,
img
)
=>
{
cc
.
loader
.
load
({
url
},
(
err
,
img
)
=>
{
const
spriteFrame
=
new
cc
.
SpriteFrame
(
img
)
const
spriteFrame
=
new
cc
.
SpriteFrame
(
img
)
if
(
cb
)
{
if
(
cb
)
{
cb
(
spriteFrame
);
cb
(
spriteFrame
);
...
@@ -100,24 +100,28 @@ export function getSprNodeByUrl(url, cb) {
...
@@ -100,24 +100,28 @@ export function getSprNodeByUrl(url, cb) {
export
function
playAudio
(
audioClip
,
cb
=
null
)
{
export
function
playAudio
(
audioClip
,
cb
=
null
)
{
if
(
audioClip
)
{
if
(
audioClip
)
{
const
audioId
=
cc
.
audioEngine
.
playEffect
(
audioClip
,
false
,
0.8
);
const
audioId
=
cc
.
audioEngine
.
playEffect
(
audioClip
,
false
,
0.8
);
if
(
cb
)
{
if
(
cb
)
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cb
();
cb
();
});
});
}
}
}
}
}
}
export
function
playAudioByUrl
(
audio_url
,
cb
=
null
)
{
export
function
playAudioByUrl
(
audio_url
,
cb
=
null
)
{
if
(
audio_url
)
{
if
(
audio_url
)
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
playAudio
(
audioClip
,
cb
);
playAudio
(
audioClip
,
cb
);
});
});
}
}
else
{
if
(
cb
&&
typeof
(
cb
)
==
'
function
'
)
{
cb
();
}
}
}
}
...
...
play/assets/et_13/texture/icon_bigstar.png
0 → 100644
View file @
2f224257
14.5 KB
play/assets/et_13/texture/icon_bigstar.png.meta
0 → 100644
View file @
2f224257
{
"ver": "2.3.5",
"uuid": "d3a49532-95aa-4e7c-928b-a27b02497a8f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 278,
"height": 275,
"platformSettings": {},
"subMetas": {
"icon_bigstar": {
"ver": "1.0.4",
"uuid": "34d97abe-f3fb-4599-9d5a-55e730f6d897",
"rawTextureUuid": "d3a49532-95aa-4e7c-928b-a27b02497a8f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 278,
"height": 275,
"rawWidth": 278,
"rawHeight": 275,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"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