Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dfzx_ac2
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_ac2
Commits
2bd86de7
Commit
2bd86de7
authored
Mar 20, 2021
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev commit
parent
5735033e
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
1963 additions
and
245 deletions
+1963
-245
form.component.html
form/src/app/form/form.component.html
+2
-2
出现.mp3
play/assets/tmpGame/audios/出现.mp3
+0
-0
出现.mp3.meta
play/assets/tmpGame/audios/出现.mp3.meta
+8
-0
大星.mp3
play/assets/tmpGame/audios/大星.mp3
+0
-0
大星.mp3.meta
play/assets/tmpGame/audios/大星.mp3.meta
+8
-0
按钮.mp3
play/assets/tmpGame/audios/按钮.mp3
+0
-0
按钮.mp3.meta
play/assets/tmpGame/audios/按钮.mp3.meta
+8
-0
撒花.mp3
play/assets/tmpGame/audios/撒花.mp3
+0
-0
撒花.mp3.meta
play/assets/tmpGame/audios/撒花.mp3.meta
+8
-0
正确.mp3
play/assets/tmpGame/audios/正确.mp3
+0
-0
正确.mp3.meta
play/assets/tmpGame/audios/正确.mp3.meta
+8
-0
错误泡泡爆炸.mp3
play/assets/tmpGame/audios/错误泡泡爆炸.mp3
+0
-0
错误泡泡爆炸.mp3.meta
play/assets/tmpGame/audios/错误泡泡爆炸.mp3.meta
+8
-0
题数.mp3
play/assets/tmpGame/audios/题数.mp3
+0
-0
题数.mp3.meta
play/assets/tmpGame/audios/题数.mp3.meta
+8
-0
BRLNSDB_1.TTF
play/assets/tmpGame/fonts/BRLNSDB_1.TTF
+0
-0
BRLNSDB_1.TTF.meta
play/assets/tmpGame/fonts/BRLNSDB_1.TTF.meta
+5
-0
bubble.prefab
play/assets/tmpGame/prefabs/bubble.prefab
+227
-4
score.prefab
play/assets/tmpGame/prefabs/score.prefab
+304
-0
score.prefab.meta
play/assets/tmpGame/prefabs/score.prefab.meta
+8
-0
star.prefab
play/assets/tmpGame/prefabs/star.prefab
+119
-0
star.prefab.meta
play/assets/tmpGame/prefabs/star.prefab.meta
+8
-0
Scene.fire
play/assets/tmpGame/scene/Scene.fire
+802
-117
Cartoon.js
play/assets/tmpGame/script/Cartoon.js
+3
-3
GameLogic.js
play/assets/tmpGame/script/GameLogic.js
+271
-118
Scene.js
play/assets/tmpGame/script/Scene.js
+11
-1
btn_restart.png
play/assets/tmpGame/textures/btn_restart.png
+0
-0
btn_restart.png.meta
play/assets/tmpGame/textures/btn_restart.png.meta
+36
-0
多边形1拷贝.png
play/assets/tmpGame/textures/多边形1拷贝.png
+0
-0
多边形1拷贝.png.meta
play/assets/tmpGame/textures/多边形1拷贝.png.meta
+37
-0
组21.png
play/assets/tmpGame/textures/组21.png
+0
-0
组21.png.meta
play/assets/tmpGame/textures/组21.png.meta
+37
-0
组22.png
play/assets/tmpGame/textures/组22.png
+0
-0
组22.png.meta
play/assets/tmpGame/textures/组22.png.meta
+37
-0
No files found.
form/src/app/form/form.component.html
View file @
2bd86de7
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<div
class=
"section-title"
>
<div
class=
"section-title"
>
正确选项
正确选项
<div
style=
"text-align: center; float: right;"
>
<div
style=
"text-align: center; float: right;"
>
<button
nz-button
nzType=
"primary"
(
click
)="
addChoice
(
item
.
correct
)"
[
disabled
]="(
item
.
correct
.
length
+
item
.
incorrect
.
length
)
>
=5" >
<button
nz-button
nzType=
"primary"
(
click
)="
addChoice
(
item
.
correct
)"
[
disabled
]="(
item
.
correct
.
length
+
item
.
incorrect
.
length
)
>
=
2
5" >
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
添加
添加
</button>
</button>
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
<div
class=
"section-title"
>
<div
class=
"section-title"
>
错误选项
错误选项
<div
style=
"text-align: center; float: right;"
>
<div
style=
"text-align: center; float: right;"
>
<button
nz-button
nzType=
"primary"
(
click
)="
addChoice
(
item
.
incorrect
)"
[
disabled
]="(
item
.
correct
.
length
+
item
.
incorrect
.
length
)
>
=5" >
<button
nz-button
nzType=
"primary"
(
click
)="
addChoice
(
item
.
incorrect
)"
[
disabled
]="(
item
.
correct
.
length
+
item
.
incorrect
.
length
)
>
=
2
5" >
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
添加
添加
</button>
</button>
...
...
play/assets/tmpGame/audios/出现.mp3
0 → 100644
View file @
2bd86de7
File added
play/assets/tmpGame/audios/出现.mp3.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.0.1",
"uuid": "2c94b99a-83f0-4445-85d6-90033de17743",
"downloadMode": 0,
"duration": 1.28,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/audios/大星.mp3
0 → 100644
View file @
2bd86de7
File added
play/assets/tmpGame/audios/大星.mp3.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.0.1",
"uuid": "f50e6692-cafe-4ae1-8020-82d9e17ee7cc",
"downloadMode": 0,
"duration": 1.776327,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/audios/按钮.mp3
0 → 100644
View file @
2bd86de7
File added
play/assets/tmpGame/audios/按钮.mp3.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.0.1",
"uuid": "8b0de757-146b-48c6-9bbe-c9d2e8a82d62",
"downloadMode": 0,
"duration": 0.130612,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/audios/撒花.mp3
0 → 100644
View file @
2bd86de7
File added
play/assets/tmpGame/audios/撒花.mp3.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.0.1",
"uuid": "0eb532a7-392b-480e-b1dc-95f9d1ec3d43",
"downloadMode": 0,
"duration": 4.04898,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/audios/正确.mp3
0 → 100644
View file @
2bd86de7
File added
play/assets/tmpGame/audios/正确.mp3.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.0.1",
"uuid": "c9219c80-862c-4336-adfb-b7853a2edec4",
"downloadMode": 0,
"duration": 0.470204,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/audios/错误泡泡爆炸.mp3
0 → 100644
View file @
2bd86de7
File added
play/assets/tmpGame/audios/错误泡泡爆炸.mp3.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.0.1",
"uuid": "5a9ddd25-4e45-485d-b859-75225b66a5f3",
"downloadMode": 0,
"duration": 0.261224,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/audios/题数.mp3
0 → 100644
View file @
2bd86de7
File added
play/assets/tmpGame/audios/题数.mp3.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.0.1",
"uuid": "16f053c4-cd27-439d-a7f7-beb6812f238d",
"downloadMode": 0,
"duration": 2.115917,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/fonts/BRLNSDB.TTF
→
play/assets/tmpGame/fonts/BRLNSDB
_1
.TTF
View file @
2bd86de7
File moved
play/assets/tmpGame/fonts/BRLNSDB.TTF.meta
→
play/assets/tmpGame/fonts/BRLNSDB
_1
.TTF.meta
View file @
2bd86de7
{
{
"ver": "1.1.0",
"ver": "1.1.0",
"uuid": "
c551970e-b095-45f3-9f1d-25cde8b8deb1
",
"uuid": "
b7fe7dd8-88c4-4197-a5fd-c255b47ce270
",
"subMetas": {}
"subMetas": {}
}
}
\ No newline at end of file
play/assets/tmpGame/prefabs/bubble.prefab
View file @
2bd86de7
...
@@ -16,15 +16,22 @@
...
@@ -16,15 +16,22 @@
"_name": "bubble_0",
"_name": "bubble_0",
"_objFlags": 0,
"_objFlags": 0,
"_parent": null,
"_parent": null,
"_children": [],
"_children": [
{
"__id__": 2
},
{
"__id__": 5
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
2
"__id__":
8
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
3
"__id__":
9
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -73,6 +80,222 @@
...
@@ -73,6 +80,222 @@
"groupIndex": 0,
"groupIndex": 0,
"_id": ""
"_id": ""
},
},
{
"__type__": "cc.Node",
"_name": "image_container",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 36
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_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.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "ff427172-05bc-4907-a9d6-859d14218f60"
},
"fileId": "3eDLNiCRNNZJMm5RAEFHhO",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "text_container",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 29,
"b": 140,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 180,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 56,
"_lineHeight": 56,
"_enableWrapText": false,
"_N$file": {
"__uuid__": "b7fe7dd8-88c4-4197-a5fd-c255b47ce270"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 2,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "ff427172-05bc-4907-a9d6-859d14218f60"
},
"fileId": "2akJJN5Z5PBojIxLlwAnDB",
"sync": false
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
...
@@ -111,7 +334,7 @@
...
@@ -111,7 +334,7 @@
"__id__": 1
"__id__": 1
},
},
"asset": {
"asset": {
"__
id__": 0
"__
uuid__": "ff427172-05bc-4907-a9d6-859d14218f60"
},
},
"fileId": "54TnCPh51Nt4I/6fuKOZwD",
"fileId": "54TnCPh51Nt4I/6fuKOZwD",
"sync": false
"sync": false
...
...
play/assets/tmpGame/prefabs/score.prefab
0 → 100644
View file @
2bd86de7
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "score",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 8
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 62,
"height": 69
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "a",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 62,
"height": 66
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "e3fc5cc3-7007-4f39-a4f7-854a16e06883"
},
"_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.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "2ehQ1DzLhCRJdyBzgQ88Aj",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "b",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 62,
"height": 69
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "87136bc7-13f1-4c93-a705-396b8d9281b2"
},
"_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.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "41kL1szANO2ouMr08mlJoi",
"sync": false
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "a44F9OiL5Eo6Ir9dAPn8RP",
"sync": false
}
]
\ No newline at end of file
play/assets/tmpGame/prefabs/score.prefab.meta
0 → 100644
View file @
2bd86de7
{
"ver": "1.2.7",
"uuid": "22b14cf4-f840-4245-b8f0-191b685e7250",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/prefabs/star.prefab
0 → 100644
View file @
2bd86de7
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "star",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 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,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "0d4e8ab5-1e48-4a70-b5f3-41ac05264cbf"
},
"_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.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c1jVDqsUJFhIGH8PNlPXNc",
"sync": false
}
]
\ No newline at end of file
play/assets/tmpGame/prefabs/star.prefab.meta
0 → 100644
View file @
2bd86de7
{
"ver": "1.2.7",
"uuid": "2592d02f-4ff3-4cd6-805b-c204271d4e87",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/scene/Scene.fire
View file @
2bd86de7
...
@@ -81,28 +81,34 @@
...
@@ -81,28 +81,34 @@
"__id__": 11
"__id__": 11
},
},
{
{
"__id__": 1
4
"__id__": 1
5
},
},
{
{
"__id__": 1
7
"__id__": 1
8
},
},
{
{
"__id__": 2
0
"__id__": 2
1
},
},
{
{
"__id__": 21
"__id__": 22
},
{
"__id__": 23
},
{
"__id__": 24
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
31
"__id__":
46
},
},
{
{
"__id__":
32
"__id__":
47
},
},
{
{
"__id__":
33
"__id__":
48
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -192,7 +198,7 @@
...
@@ -192,7 +198,7 @@
"array": [
"array": [
0,
0,
0,
0,
269.2779075551640
6,
342.1882876703263
6,
0,
0,
0,
0,
0,
0,
...
@@ -545,10 +551,10 @@
...
@@ -545,10 +551,10 @@
}
}
],
],
"_armatureName": "Armature",
"_armatureName": "Armature",
"_animationName": "",
"_animationName": "
normal
",
"_preCacheMode": 0,
"_preCacheMode": 0,
"_cacheMode": 0,
"_cacheMode": 0,
"playTimes":
-
1,
"playTimes": 1,
"premultipliedAlpha": false,
"premultipliedAlpha": false,
"_armatureKey": "e3d39ead-9ae5-45df-a908-d9fee96d1c97#8b7f8e75-240d-4acb-9738-aa9bcc9e582e",
"_armatureKey": "e3d39ead-9ae5-45df-a908-d9fee96d1c97#8b7f8e75-240d-4acb-9738-aa9bcc9e582e",
"_accTime": 0,
"_accTime": 0,
...
@@ -564,7 +570,7 @@
...
@@ -564,7 +570,7 @@
"__uuid__": "8b7f8e75-240d-4acb-9738-aa9bcc9e582e"
"__uuid__": "8b7f8e75-240d-4acb-9738-aa9bcc9e582e"
},
},
"_N$_defaultArmatureIndex": 0,
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex":
0
,
"_N$_animationIndex":
1
,
"_N$_defaultCacheMode": 0,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$debugBones": false,
...
@@ -584,7 +590,11 @@
...
@@ -584,7 +590,11 @@
}
}
],
],
"_active": true,
"_active": true,
"_components": [],
"_components": [
{
"__id__": 14
}
],
"_prefab": null,
"_prefab": null,
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -727,6 +737,76 @@
...
@@ -727,6 +737,76 @@
"_atlas": null,
"_atlas": null,
"_id": "51bEV4gBJCSKFOzH4S+tEC"
"_id": "51bEV4gBJCSKFOzH4S+tEC"
},
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_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__": 11
},
"_id": "84H6w8D3FJB6TcFxn9bsAh"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "btn_restart",
"_name": "btn_restart",
...
@@ -736,10 +816,10 @@
...
@@ -736,10 +816,10 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 1
5
"__id__": 1
6
}
}
],
],
"_active":
fals
e,
"_active":
tru
e,
"_components": [],
"_components": [],
"_prefab": null,
"_prefab": null,
"_opacity": 255,
"_opacity": 255,
...
@@ -791,16 +871,16 @@
...
@@ -791,16 +871,16 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "btn_start",
"_name": "btn_
re
start",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
4
"__id__": 1
5
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
6
"__id__": 1
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -814,7 +894,7 @@
...
@@ -814,7 +894,7 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
36
6,
"width":
43
6,
"height": 256
"height": 256
},
},
"_anchorPoint": {
"_anchorPoint": {
...
@@ -833,8 +913,8 @@
...
@@ -833,8 +913,8 @@
0,
0,
0,
0,
1,
1,
1
,
0
,
1
,
0
,
1
1
]
]
},
},
...
@@ -849,14 +929,14 @@
...
@@ -849,14 +929,14 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
79ijcN3CJHyJNwMMxbhJms
"
"_id": "
8ejTUT7DRLlL2aqC5HZXQL
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
5
"__id__": 1
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -867,7 +947,7 @@
...
@@ -867,7 +947,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
0ddfe260-a85c-425a-9cca-5e6e5c516d3
1"
"__uuid__": "
955b7ad5-9107-4588-8235-d652be51ace
1"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 1,
...
@@ -881,7 +961,7 @@
...
@@ -881,7 +961,7 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "7
bL+rdwa9DbYCZEydqi0T+
"
"_id": "7
3Wsd+3YRI8KwX/EhEiCH3
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
...
@@ -892,7 +972,7 @@
...
@@ -892,7 +972,7 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 1
8
"__id__": 1
9
}
}
],
],
"_active": true,
"_active": true,
...
@@ -950,13 +1030,13 @@
...
@@ -950,13 +1030,13 @@
"_name": "btn_back",
"_name": "btn_back",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
7
"__id__": 1
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
19
"__id__":
20
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1012,7 +1092,7 @@
...
@@ -1012,7 +1092,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
8
"__id__": 1
9
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1072,8 +1152,8 @@
...
@@ -1072,8 +1152,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0
,
2.661
,
0
,
2.661
,
0,
0,
0,
0,
0,
0,
...
@@ -1099,23 +1179,13 @@
...
@@ -1099,23 +1179,13 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
res
",
"_name": "
star_group
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
},
},
"_children": [
"_children": [],
{
"_active": true,
"__id__": 22
},
{
"__id__": 25
},
{
"__id__": 28
}
],
"_active": false,
"_components": [],
"_components": [],
"_prefab": null,
"_prefab": null,
"_opacity": 255,
"_opacity": 255,
...
@@ -1141,7 +1211,7 @@
...
@@ -1141,7 +1211,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
0,
-50
0,
0,
0,
0,
0,
0,
0,
...
@@ -1163,20 +1233,16 @@
...
@@ -1163,20 +1233,16 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
0aAzbH6R1E+6AmGRrkKa5O
"
"_id": "
86ZqOQZkxD5L0y9H+unQec
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
font
",
"_name": "
score_group
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
1
"__id__": 2
},
},
"_children": [
"_children": [],
{
"__id__": 23
}
],
"_active": true,
"_active": true,
"_components": [],
"_components": [],
"_prefab": null,
"_prefab": null,
...
@@ -1202,7 +1268,7 @@
...
@@ -1202,7 +1268,7 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
60
0,
0,
0,
0,
0,
0,
0,
...
@@ -1225,22 +1291,28 @@
...
@@ -1225,22 +1291,28 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "9
bLfcYeeNKrr524vzWchiM
"
"_id": "9
8siPBSYBPIre9IkAmH4s4
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
BRLNSDB
",
"_name": "
res
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
2
"__id__": 2
},
},
"_children": [],
"_children": [
"_active": true,
"_components": [
{
{
"__id__": 24
"__id__": 25
},
{
"__id__": 26
},
{
"__id__": 29
}
}
],
],
"_active": false,
"_components": [],
"_prefab": null,
"_prefab": null,
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1287,50 +1359,76 @@
...
@@ -1287,50 +1359,76 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
cfMLGsq0BMhJARv+ySMAxS
"
"_id": "
0aAzbH6R1E+6AmGRrkKa5O
"
},
},
{
{
"__type__": "cc.
Label
",
"__type__": "cc.
Node
",
"_name": "",
"_name": "
font
",
"_objFlags": 0,
"_objFlags": 0,
"
node
": {
"
_parent
": {
"__id__": 2
3
"__id__": 2
4
},
},
"_enabled": true,
"_children": [],
"_materials": [],
"_active": true,
"_srcBlendFactor": 770,
"_components": [],
"_dstBlendFactor": 771,
"_prefab": null,
"_useOriginalSize": true,
"_opacity": 255,
"_string": "",
"_color": {
"_N$string": "",
"__type__": "cc.Color",
"_fontSize": 40,
"r": 255,
"_lineHeight": 40,
"g": 255,
"_enableWrapText": true,
"b": 255,
"_N$file": {
"a": 255
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
},
},
"_contentSize": {
"_isSystemFontUsed": false,
"__type__": "cc.Size",
"_spacingX": 0,
"width": 0,
"_batchAsBitmap": false,
"height": 0
"_styleFlags": 0,
},
"_underlineHeight": 0,
"_anchorPoint": {
"_N$horizontalAlign": 0,
"__type__": "cc.Vec2",
"_N$verticalAlign": 0,
"x": 0.5,
"_N$fontFamily": "Arial",
"y": 0.5
"_N$overflow": 0,
},
"_N$cacheMode": 0,
"_trs": {
"_id": "9bNHNPu5lC7rQYyr8ai/sY"
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "9bLfcYeeNKrr524vzWchiM"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "img",
"_name": "img",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
1
"__id__": 2
4
},
},
"_children": [
"_children": [
{
{
"__id__": 2
6
"__id__": 2
7
}
}
],
],
"_active": true,
"_active": true,
...
@@ -1388,13 +1486,13 @@
...
@@ -1388,13 +1486,13 @@
"_name": "icon",
"_name": "icon",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
5
"__id__": 2
6
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
7
"__id__": 2
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1450,7 +1548,7 @@
...
@@ -1450,7 +1548,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
6
"__id__": 2
7
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [],
...
@@ -1478,11 +1576,32 @@
...
@@ -1478,11 +1576,32 @@
"_name": "audio",
"_name": "audio",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
1
"__id__": 2
4
},
},
"_children": [
"_children": [
{
{
"__id__": 29
"__id__": 30
},
{
"__id__": 32
},
{
"__id__": 34
},
{
"__id__": 36
},
{
"__id__": 38
},
{
"__id__": 40
},
{
"__id__": 42
},
{
"__id__": 44
}
}
],
],
"_active": true,
"_active": true,
...
@@ -1540,13 +1659,13 @@
...
@@ -1540,13 +1659,13 @@
"_name": "btn",
"_name": "btn",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
8
"__id__": 2
9
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 3
0
"__id__": 3
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1602,7 +1721,7 @@
...
@@ -1602,7 +1721,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
29
"__id__":
30
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -1616,28 +1735,588 @@
...
@@ -1616,28 +1735,588 @@
"_id": "0adN50f61DlbmppsPkOnjX"
"_id": "0adN50f61DlbmppsPkOnjX"
},
},
{
{
"__type__": "cc.
Canvas
",
"__type__": "cc.
Node
",
"_name": "",
"_name": "
出现
",
"_objFlags": 0,
"_objFlags": 0,
"
node
": {
"
_parent
": {
"__id__": 2
"__id__": 2
9
},
},
"_enabled": true,
"_children": [],
"_designResolution": {
"_active": true,
"_components": [
{
"__id__": 33
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
128
0,
"width": 0,
"height":
72
0
"height": 0
},
},
"_fitWidth": false,
"_anchorPoint": {
"_fitHeight": false,
"__type__": "cc.Vec2",
"_id": "59Cd0ovbdF4byw5sbjJDx7"
"x": 0.5,
},
"y": 0.5
{
},
"__type__": "cc.Widget",
"_trs": {
"_name": "",
"__type__": "TypedArray",
"_objFlags": 0,
"ctor": "Float64Array",
"node": {
"array": [
"__id__": 2
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "deg4shwwBHAYgAuxgXnEaG"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"_clip": {
"__uuid__": "2c94b99a-83f0-4445-85d6-90033de17743"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "8eYfvHm7lGSoHEq1lPIITv"
},
{
"__type__": "cc.Node",
"_name": "正确",
"_objFlags": 0,
"_parent": {
"__id__": 29
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 35
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d4DR4D2kRCtYS61JHz16On"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
},
"_enabled": true,
"_clip": {
"__uuid__": "c9219c80-862c-4336-adfb-b7853a2edec4"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "19cbOsmtxMN6RCLWX4N6zc"
},
{
"__type__": "cc.Node",
"_name": "错误泡泡爆炸",
"_objFlags": 0,
"_parent": {
"__id__": 29
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 37
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "34v1iA+MpBBpPamhDzkIKZ"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
},
"_enabled": true,
"_clip": {
"__uuid__": "5a9ddd25-4e45-485d-b859-75225b66a5f3"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "b8wGFT089FlL6taclNT/sm"
},
{
"__type__": "cc.Node",
"_name": "按钮",
"_objFlags": 0,
"_parent": {
"__id__": 29
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "554D1gTPZCsKFgjQaeuxPV"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
},
"_enabled": true,
"_clip": {
"__uuid__": "8b0de757-146b-48c6-9bbe-c9d2e8a82d62"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "4fdIjYCWtGQ4ClpxyODru+"
},
{
"__type__": "cc.Node",
"_name": "大星",
"_objFlags": 0,
"_parent": {
"__id__": 29
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 41
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "10u9lPXRJKgpfQv5jljZUC"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
},
"_enabled": true,
"_clip": {
"__uuid__": "f50e6692-cafe-4ae1-8020-82d9e17ee7cc"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "a2GALakfRDo4ok7uEXIl6F"
},
{
"__type__": "cc.Node",
"_name": "题数",
"_objFlags": 0,
"_parent": {
"__id__": 29
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 43
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "99PyaGeotHM6vFlz8tWzcD"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
},
"_enabled": true,
"_clip": {
"__uuid__": "16f053c4-cd27-439d-a7f7-beb6812f238d"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "0a6jNDnwpGBI0ZhTEM2vjX"
},
{
"__type__": "cc.Node",
"_name": "撒花",
"_objFlags": 0,
"_parent": {
"__id__": 29
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b3uGA7LpFKWJO6JGul5g2N"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
},
"_enabled": true,
"_clip": {
"__uuid__": "0eb532a7-392b-480e-b1dc-95f9d1ec3d43"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "492N+vNEFK9Knu36wtDFJg"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_fitWidth": false,
"_fitHeight": false,
"_id": "59Cd0ovbdF4byw5sbjJDx7"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -1670,6 +2349,12 @@
...
@@ -1670,6 +2349,12 @@
"bubble": {
"bubble": {
"__uuid__": "ff427172-05bc-4907-a9d6-859d14218f60"
"__uuid__": "ff427172-05bc-4907-a9d6-859d14218f60"
},
},
"star": {
"__uuid__": "2592d02f-4ff3-4cd6-805b-c204271d4e87"
},
"score": {
"__uuid__": "22b14cf4-f840-4245-b8f0-191b685e7250"
},
"_id": "e687yyoRBIzZAOVRL8Sseh"
"_id": "e687yyoRBIzZAOVRL8Sseh"
}
}
]
]
\ No newline at end of file
play/assets/tmpGame/script/Cartoon.js
View file @
2bd86de7
...
@@ -148,10 +148,10 @@ export default class Cartoon {
...
@@ -148,10 +148,10 @@ export default class Cartoon {
return
node
return
node
}
}
subscribeTouchEvent
(
key
,
callBack
)
{
subscribeTouchEvent
(
key
,
callBack
,
newEvent
)
{
if
(
!
this
.
touchEventCallback
[
key
])
{
if
(
!
this
.
touchEventCallback
[
key
]
||
newEvent
)
{
this
.
touchEventCallback
[
key
]
=
callBack
this
.
touchEventCallback
[
key
]
=
callBack
console
.
log
(
"
DVDVDV
"
,
this
.
elements
[
key
].
node
)
this
.
elements
[
key
].
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
)
this
.
elements
[
key
].
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
)
this
.
elements
[
key
].
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
()
=>
{
this
.
elements
[
key
].
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
()
=>
{
if
(
this
.
touchEventCallback
[
key
])
{
if
(
this
.
touchEventCallback
[
key
])
{
...
...
play/assets/tmpGame/script/GameLogic.js
View file @
2bd86de7
...
@@ -15,16 +15,13 @@ export default class GameLogic {
...
@@ -15,16 +15,13 @@ export default class GameLogic {
g_animaResList
=
[];
g_animaResList
=
[];
g_properties
=
{};
g_properties
=
{};
m_bubblesAll
=
[];
m_currentQuestion
=
-
1
;
m_currentQuestion
=
-
1
;
m_gameEnd
=
false
;
m_currentQuestionIndex
=
-
1
;
m_firstEnter
=
true
;
m_rightAns
=
0
;
m_options
=
[]
m_stopMoving
=
false
;
m_avaliableAI
=
0
;
m_maxScale
=
1
;
m_curLeftAnswerPoi
=
0
;
m_curMiddleAnswerPoi
=
0
;
m_curRightAnswerPoi
=
0
;
m_maxScale
=
0.7
;
constructor
(
formData
,
systemOption
)
{
constructor
(
formData
,
systemOption
)
{
this
.
g_systemOption
=
systemOption
;
this
.
g_systemOption
=
systemOption
;
this
.
g_imageResList
=
this
.
g_systemOption
.
imageResList
;
this
.
g_imageResList
=
this
.
g_systemOption
.
imageResList
;
...
@@ -35,14 +32,14 @@ export default class GameLogic {
...
@@ -35,14 +32,14 @@ export default class GameLogic {
this
.
g_canvas
=
cc
.
find
(
'
Canvas
'
);
this
.
g_canvas
=
cc
.
find
(
'
Canvas
'
);
this
.
g_cartoon
=
new
Cartoon
(
cc
);
this
.
g_cartoon
=
new
Cartoon
(
cc
);
// if(!formData.contentObj.options || formData.contentObj.options
.length == 0) {
if
(
!
formData
.
contentObj
.
dataArray
||
formData
.
contentObj
.
dataArray
.
length
==
0
)
{
this
.
g_useDefaultData
=
true
;
this
.
g_useDefaultData
=
true
;
this
.
g_formData
=
defaultData
this
.
g_formData
=
defaultData
console
.
warn
(
"
User default data =>
"
,
this
.
g_formData
)
console
.
warn
(
"
User default data =>
"
,
this
.
g_formData
)
//
} else {
}
else
{
//
this.g_formData = formData.contentObj;
this
.
g_formData
=
formData
.
contentObj
;
//
console.log("User saved data =>", this.g_formData)
console
.
log
(
"
User saved data =>
"
,
this
.
g_formData
)
//
}
}
this
.
disableClick
(
"
Sysyem_init
"
)
this
.
disableClick
(
"
Sysyem_init
"
)
this
.
g_cartoon
.
initLocalAudios
([])
this
.
g_cartoon
.
initLocalAudios
([])
...
@@ -51,32 +48,93 @@ export default class GameLogic {
...
@@ -51,32 +48,93 @@ export default class GameLogic {
this
.
initNodes
();
this
.
initNodes
();
this
.
initBg
();
this
.
initBg
();
this
.
resetPosition
();
this
.
resetPosition
();
this
.
addEventLinstener
();
this
.
initBubbles
();
if
(
this
.
nextQuestion
())
{
this
.
g_cartoon
.
initDragEvent
()
this
.
initStar
()
this
.
enableClick
(
"
Sysyem_init
"
);
this
.
g_cartoon
.
initDragEvent
()
this
.
hideAir
();
this
.
enableClick
(
"
Sysyem_init
"
);
this
.
systemTick
();
this
.
hideAir
();
this
.
systemTick
();
setTimeout
(()
=>
{
this
.
releaseBubbles
()
this
.
releaseBubbles
()
}
,
500
);
}
cc
.
view
.
setResizeCallback
(()
=>
{
cc
.
view
.
setResizeCallback
(()
=>
{
this
.
initBg
();
this
.
initBg
();
this
.
resetPosition
();
this
.
resetPosition
();
});
});
}
initNodes
()
{
this
.
g_cartoon
.
initCartoonElement
(
"
background
"
,
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/background/background`
));
this
.
g_cartoon
.
initCartoonElement
(
"
audio
"
,
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/speaker`
));
this
.
g_cartoon
.
initCartoonElement
(
"
back
"
,
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/btn_back/btn_back`
));
this
.
g_cartoon
.
initCartoonElement
(
"
restart
"
,
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/btn_restart/btn_restart`
));
this
.
g_cartoon
.
initCartoonElement
(
"
lion
"
,
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/lion/DB`
));
}
initBg
()
{
const
bgMain
=
this
.
g_cartoon
.
getCartoonElement
(
"
background
"
)
bgMain
.
node
.
width
=
cc
.
winSize
.
width
bgMain
.
node
.
height
=
cc
.
winSize
.
height
}
resetPosition
()
{
let
node
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/speaker`
)
node
.
x
=
-
cc
.
winSize
.
width
/
2
+
100
node
.
y
=
-
cc
.
winSize
.
height
/
2
+
100
this
.
m_bubblesAll
.
push
({
node
:
node
,
move
:
{
r
:
50
,
x
:
node
.
x
,
y
:
node
.
y
,
vX
:
0
,
vY
:
0
,
enable
:
true
,
fix
:
true
,
scale
:
1
,
id
:
999
,
lastId
:
null
}})
node
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/btn_back`
)
node
.
x
=
-
cc
.
winSize
.
width
/
2
+
60
node
.
y
=
cc
.
winSize
.
height
/
2
-
50
this
.
m_bubblesAll
.
push
({
node
:
node
,
move
:
{
r
:
40
,
x
:
node
.
x
,
y
:
node
.
y
,
vX
:
0
,
vY
:
0
,
enable
:
true
,
fix
:
true
,
scale
:
1
,
id
:
998
,
lastId
:
null
}})
node
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/btn_restart`
)
node
.
x
=
0
node
.
y
=
20
// this.m_bubblesAll.push({node: node, move: {
// r: 90, x: node.x, y: node.y, vX: 0, vY: 0, enable: true, fix: true, scale: 1
// }})
node
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/lion`
)
node
.
x
=
cc
.
winSize
.
width
/
2
-
150
node
.
y
=
-
cc
.
winSize
.
height
/
2
+
170
this
.
m_bubblesAll
.
push
({
node
:
node
,
move
:
{
r
:
90
,
x
:
node
.
x
,
y
:
node
.
y
,
vX
:
0
,
vY
:
0
,
enable
:
true
,
fix
:
true
,
scale
:
1
,
id
:
997
,
lastId
:
null
}})
node
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/star_group`
)
node
.
y
=
-
cc
.
winSize
.
height
/
2
-
140
}
addEventLinstener
()
{
const
btn_restart
=
this
.
g_cartoon
.
getCartoonElement
(
"
restart
"
)
this
.
g_cartoon
.
subscribeTouchEvent
(
"
restart
"
,
_
=>
{
this
.
g_cartoon
.
tweenChange
(
btn_restart
.
node
,
{
scaleX
:
0
,
scaleY
:
0
},
0.2
,
_
=>
{
this
.
enableClick
(
"
Restart
"
)
this
.
restartGame
();
})
})
const
btn_lion
=
this
.
g_cartoon
.
getCartoonElement
(
"
lion
"
)
this
.
g_cartoon
.
subscribeTouchEvent
(
"
lion
"
,
_
=>
{
let
a
=
btn_lion
.
node
.
getComponent
(
dragonBones
.
ArmatureDisplay
)
a
.
playAnimation
(
'
Armature
'
,
1
);
})
}
}
systemTick
()
{
systemTick
()
{
let
maxNum
=
this
.
bubblesAll
.
length
;
let
maxNum
=
this
.
m_
bubblesAll
.
length
;
let
maxX
=
cc
.
winSize
.
width
/
2
;
let
maxX
=
cc
.
winSize
.
width
/
2
;
let
maxY
=
cc
.
winSize
.
height
/
2
;
let
maxY
=
cc
.
winSize
.
height
/
2
;
setInterval
(()
=>
{
setInterval
(()
=>
{
this
.
bubblesAll
.
forEach
((
bubble
,
index_x
)
=>
{
this
.
m_
bubblesAll
.
forEach
((
bubble
,
index_x
)
=>
{
if
(
bubble
.
move
.
enable
&&
!
bubble
.
move
.
fix
)
{
if
(
!
this
.
m_stopMoving
&&
bubble
.
move
.
enable
&&
!
bubble
.
move
.
fix
)
{
bubble
.
move
.
x
+=
bubble
.
move
.
vX
bubble
.
move
.
x
+=
bubble
.
move
.
vX
bubble
.
move
.
y
+=
bubble
.
move
.
vY
bubble
.
move
.
y
+=
bubble
.
move
.
vY
if
(
bubble
.
move
.
scale
<
this
.
m_maxScale
)
{
if
(
bubble
.
move
.
scale
<
this
.
m_maxScale
)
{
...
@@ -91,22 +149,22 @@ export default class GameLogic {
...
@@ -91,22 +149,22 @@ export default class GameLogic {
if
(
bubble
.
move
.
x
>=
maxX
-
bubble
.
move
.
r
*
bubble
.
move
.
scale
)
{
if
(
bubble
.
move
.
x
>=
maxX
-
bubble
.
move
.
r
*
bubble
.
move
.
scale
)
{
bubble
.
move
.
x
=
maxX
-
bubble
.
move
.
r
*
bubble
.
move
.
scale
;
bubble
.
move
.
x
=
maxX
-
bubble
.
move
.
r
*
bubble
.
move
.
scale
;
bubble
.
move
.
vX
=
-
bubble
.
move
.
vX
;
bubble
.
move
.
vX
=
-
bubble
.
move
.
vX
;
bubble
.
move
.
lastId
=
null
;
//
bubble.move.lastId = null;
}
}
if
(
bubble
.
move
.
x
<=
-
maxX
+
bubble
.
move
.
r
*
bubble
.
move
.
scale
)
{
if
(
bubble
.
move
.
x
<=
-
maxX
+
bubble
.
move
.
r
*
bubble
.
move
.
scale
)
{
bubble
.
move
.
x
=
-
maxX
+
bubble
.
move
.
r
*
bubble
.
move
.
scale
;
bubble
.
move
.
x
=
-
maxX
+
bubble
.
move
.
r
*
bubble
.
move
.
scale
;
bubble
.
move
.
vX
=
-
bubble
.
move
.
vX
;
bubble
.
move
.
vX
=
-
bubble
.
move
.
vX
;
bubble
.
move
.
lastId
=
null
;
//
bubble.move.lastId = null;
}
}
if
(
bubble
.
move
.
y
>=
maxY
-
bubble
.
move
.
r
*
bubble
.
move
.
scale
)
{
if
(
bubble
.
move
.
y
>=
maxY
-
bubble
.
move
.
r
*
bubble
.
move
.
scale
)
{
bubble
.
move
.
y
=
maxY
-
bubble
.
move
.
r
*
bubble
.
move
.
scale
;
bubble
.
move
.
y
=
maxY
-
bubble
.
move
.
r
*
bubble
.
move
.
scale
;
bubble
.
move
.
vY
=
-
bubble
.
move
.
vY
;
bubble
.
move
.
vY
=
-
bubble
.
move
.
vY
;
bubble
.
move
.
lastId
=
null
;
//
bubble.move.lastId = null;
}
}
if
(
bubble
.
move
.
y
<=
-
maxY
+
bubble
.
move
.
r
*
bubble
.
move
.
scale
)
{
if
(
bubble
.
move
.
y
<=
-
maxY
+
bubble
.
move
.
r
*
bubble
.
move
.
scale
)
{
bubble
.
move
.
y
=
-
maxY
+
bubble
.
move
.
r
*
bubble
.
move
.
scale
;
bubble
.
move
.
y
=
-
maxY
+
bubble
.
move
.
r
*
bubble
.
move
.
scale
;
bubble
.
move
.
vY
=
-
bubble
.
move
.
vY
;
bubble
.
move
.
vY
=
-
bubble
.
move
.
vY
;
bubble
.
move
.
lastId
=
null
;
//
bubble.move.lastId = null;
}
}
bubble
.
node
.
x
=
bubble
.
move
.
x
bubble
.
node
.
x
=
bubble
.
move
.
x
...
@@ -114,22 +172,23 @@ export default class GameLogic {
...
@@ -114,22 +172,23 @@ export default class GameLogic {
for
(
var
j
=
0
;
j
<
maxNum
;
j
++
)
{
for
(
var
j
=
0
;
j
<
maxNum
;
j
++
)
{
if
(
j
!==
index_x
)
{
if
(
j
!==
index_x
)
{
if
(
Math
.
round
(
Math
.
pow
(
this
.
bubblesAll
[
index_x
].
node
.
x
-
this
.
bubblesAll
[
j
].
node
.
x
,
2
)
+
if
(
Math
.
round
(
Math
.
pow
(
this
.
m_bubblesAll
[
index_x
].
node
.
x
-
this
.
m_
bubblesAll
[
j
].
node
.
x
,
2
)
+
Math
.
pow
(
this
.
bubblesAll
[
index_x
].
node
.
y
-
this
.
bubblesAll
[
j
].
node
.
y
,
2
))
<=
Math
.
pow
(
this
.
m_bubblesAll
[
index_x
].
node
.
y
-
this
.
m_
bubblesAll
[
j
].
node
.
y
,
2
))
<=
Math
.
round
(
Math
.
pow
(
this
.
bubblesAll
[
index_x
].
move
.
r
*
this
.
bubblesAll
[
index_x
].
move
.
scale
+
this
.
bubblesAll
[
j
].
move
.
r
*
this
.
bubblesAll
[
j
].
move
.
scale
,
2
)))
{
Math
.
round
(
Math
.
pow
(
this
.
m_bubblesAll
[
index_x
].
move
.
r
*
this
.
m_bubblesAll
[
index_x
].
move
.
scale
+
this
.
m_bubblesAll
[
j
].
move
.
r
*
this
.
m_
bubblesAll
[
j
].
move
.
scale
,
2
)))
{
var
tempX
=
this
.
bubblesAll
[
index_x
].
move
.
vX
;
var
tempX
=
this
.
m_bubblesAll
[
index_x
].
move
.
vX
;
var
tempY
=
this
.
bubblesAll
[
index_x
].
move
.
vY
;
var
tempY
=
this
.
m_bubblesAll
[
index_x
].
move
.
vY
;
if
(
this
.
bubblesAll
[
index_x
].
move
.
lastId
!=
this
.
bubblesAll
[
j
].
move
.
id
)
{
if
(
this
.
m_bubblesAll
[
index_x
].
move
.
lastId
!=
this
.
m_bubblesAll
[
j
].
move
.
id
)
{
this
.
bubblesAll
[
index_x
].
move
.
lastId
=
this
.
bubblesAll
[
j
].
move
.
id
this
.
m_bubblesAll
[
index_x
].
move
.
lastId
=
this
.
m_bubblesAll
[
j
].
move
.
id
;
if
(
this
.
bubblesAll
[
j
].
move
.
fix
)
{
this
.
m_bubblesAll
[
j
].
move
.
lastId
=
this
.
m_bubblesAll
[
index_x
].
move
.
id
;
this
.
bubblesAll
[
index_x
].
move
.
vX
=
-
this
.
bubblesAll
[
index_x
].
move
.
vX
;
if
(
this
.
m_bubblesAll
[
j
].
move
.
fix
)
{
this
.
bubblesAll
[
index_x
].
move
.
vY
=
-
this
.
bubblesAll
[
index_x
].
move
.
vY
;
this
.
m_bubblesAll
[
index_x
].
move
.
vX
=
-
this
.
m_bubblesAll
[
index_x
].
move
.
vX
;
this
.
m_bubblesAll
[
index_x
].
move
.
vY
=
-
this
.
m_bubblesAll
[
index_x
].
move
.
vY
;
}
else
{
}
else
{
this
.
bubblesAll
[
index_x
].
move
.
vX
=
this
.
bubblesAll
[
j
].
move
.
vX
;
this
.
m_bubblesAll
[
index_x
].
move
.
vX
=
this
.
m_
bubblesAll
[
j
].
move
.
vX
;
this
.
bubblesAll
[
j
].
move
.
vX
=
tempX
;
this
.
m_
bubblesAll
[
j
].
move
.
vX
=
tempX
;
this
.
bubblesAll
[
index_x
].
move
.
vY
=
this
.
bubblesAll
[
j
].
move
.
vY
;
this
.
m_bubblesAll
[
index_x
].
move
.
vY
=
this
.
m_
bubblesAll
[
j
].
move
.
vY
;
this
.
bubblesAll
[
j
].
move
.
vY
=
tempY
;
this
.
m_
bubblesAll
[
j
].
move
.
vY
=
tempY
;
}
}
}
}
}
}
...
@@ -137,114 +196,208 @@ export default class GameLogic {
...
@@ -137,114 +196,208 @@ export default class GameLogic {
}
}
}
}
})
})
},
30
)
},
30
)
}
}
initNodes
()
{
initStar
()
{
this
.
g_cartoon
.
initCartoonElement
(
"
background
"
,
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/background/background`
));
const
starGroup
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/star_group`
)
this
.
g_cartoon
.
initCartoonElement
(
"
lion
"
,
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/lion`
));
const
scoreGroup
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/score_group`
)
const
scoreAll
=
[]
for
(
let
i
=
0
;
i
<
this
.
g_formData
.
dataArray
.
length
;
i
++
)
{
const
star
=
cc
.
instantiate
(
this
.
g_systemOption
.
prefabs
.
star
);
star
.
parent
=
starGroup
;
this
.
g_cartoon
.
setCartoonElement
(
`star_
${
i
}
`
,
star
)
const
score
=
cc
.
instantiate
(
this
.
g_systemOption
.
prefabs
.
score
);
score
.
parent
=
scoreGroup
;
this
.
g_cartoon
.
setCartoonElement
(
`score_
${
i
}
`
,
score
)
scoreAll
.
push
(
score
)
}
let
startY
=
(
scoreAll
.
length
*
66
+
(
scoreAll
.
length
-
1
)
*
10
)
/
2
;
scoreAll
.
forEach
((
score
,
index
)
=>
{
score
.
y
=
startY
startY
-=
66
+
10
})
}
addStar
(
callback
)
{
const
star
=
this
.
g_cartoon
.
getCartoonElement
(
`star_
${
this
.
m_currentQuestionIndex
}
`
);
const
score
=
this
.
g_cartoon
.
getCartoonElement
(
`score_
${
this
.
m_currentQuestionIndex
}
`
);
const
score_b
=
score
.
node
.
getChildByName
(
"
b
"
)
const
starGroup
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/star_group`
);
const
scoreGroup
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/score_group`
);
this
.
g_cartoon
.
tweenChange
(
star
.
node
,
{
y
:
380
},
1
,
()
=>
{
setTimeout
(()
=>
{
const
worldPos
=
starGroup
.
convertToWorldSpaceAR
(
cc
.
v2
(
star
.
node
.
x
,
star
.
node
.
y
));
const
localPos
=
scoreGroup
.
convertToNodeSpaceAR
(
cc
.
v2
(
worldPos
.
x
,
worldPos
.
y
));
star
.
node
.
parent
=
scoreGroup
;
star
.
node
.
x
=
localPos
.
x
;
star
.
node
.
y
=
localPos
.
y
;
this
.
g_cartoon
.
tweenChange
(
star
.
node
,
{
x
:
score
.
node
.
x
,
y
:
score
.
node
.
y
,
scale
:
0.2
},
0.8
,
_
=>
{
score_b
.
active
=
true
;
score_b
.
scaleX
=
0
;
score_b
.
scaleY
=
0
;
star
.
node
.
destroy
();
this
.
g_cartoon
.
tweenChange
(
score_b
,
{
scale
:
1
},
0.1
,
_
=>
{
if
(
callback
)
{
callback
()
}
})
})
},
1000
);
})
}
nextQuestion
()
{
this
.
m_currentQuestionIndex
++
;
if
(
this
.
m_currentQuestionIndex
>=
this
.
g_formData
.
dataArray
.
length
)
{
return
false
;
}
const
rightNum
=
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
correct
.
length
;
const
wrongNum
=
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
incorrect
.
length
;
const
bubbleNum
=
rightNum
+
wrongNum
;
const
bubbleParent
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/bubble_group`
)
const
bubbleParent
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/bubble_group`
)
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
for
(
let
i
=
0
;
i
<
bubbleNum
;
i
++
)
{
const
bubble
=
cc
.
instantiate
(
this
.
g_systemOption
.
prefabs
.
bubble
);
const
bubble
=
cc
.
instantiate
(
this
.
g_systemOption
.
prefabs
.
bubble
);
bubble
.
parent
=
bubbleParent
;
bubble
.
parent
=
bubbleParent
;
console
.
log
(
bubble
)
this
.
g_cartoon
.
setCartoonElement
(
`bubble_
${
i
}
`
,
bubble
)
this
.
g_cartoon
.
setCartoonElement
(
`bubble_
${
i
}
`
,
bubble
)
}
}
}
initBg
()
{
for
(
let
i
=
0
;
i
<
bubbleNum
;
i
++
)
{
const
bgMain
=
this
.
g_cartoon
.
getCartoonElement
(
"
background
"
)
// if(this.g_formData.bg.type == "custome" && this.g_formData.bg.image_url) {
// this.g_cartoon.mountImageToNode(this.g_formData.bg.image_url, bgMain.node, cc.winSize.width, cc.winSize.height, true);
// } else {
bgMain
.
node
.
width
=
cc
.
winSize
.
width
bgMain
.
node
.
height
=
cc
.
winSize
.
height
// }
}
bubblesAll
=
[]
initBubbles
()
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
const
bubble
=
this
.
g_cartoon
.
getCartoonElement
(
`bubble_
${
i
}
`
)
const
bubble
=
this
.
g_cartoon
.
getCartoonElement
(
`bubble_
${
i
}
`
)
let
item
=
i
<
rightNum
?
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
correct
[
i
]:
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
incorrect
[
i
-
rightNum
]
bubble
.
isRight
=
i
<
rightNum
?
true
:
false
;
bubble
.
move
=
{
bubble
.
move
=
{
r
:
100
,
x
:
0
,
y
:
0
,
vX
:
1
,
vY
:
1.3
,
enable
:
false
,
fix
:
false
,
scale
:
0
,
id
:
i
,
lastId
:
null
r
:
95
,
x
:
0
,
y
:
0
,
vX
:
1
,
vY
:
1.3
,
enable
:
false
,
fix
:
false
,
scale
:
0
,
id
:
i
,
lastId
:
null
}
if
(
item
.
type
==
'
Image
'
)
{
let
image
=
bubble
.
node
.
getChildByName
(
"
image_container
"
)
image
.
active
=
true
;
this
.
g_cartoon
.
mountImageToNode
(
item
.
image_url
,
image
,
120
,
120
)
}
else
{
let
text
=
bubble
.
node
.
getChildByName
(
"
text_container
"
)
text
.
active
=
true
;
var
tLabel
=
text
.
getComponent
(
cc
.
Label
)
tLabel
.
string
=
item
.
text
}
}
bubble
.
node
.
scaleX
=
0
;
bubble
.
node
.
scaleX
=
0
;
bubble
.
node
.
scaleY
=
0
;
bubble
.
node
.
scaleY
=
0
;
bubble
.
node
.
x
=
0
;
bubble
.
node
.
x
=
0
;
bubble
.
node
.
y
=
-
2000
;
bubble
.
node
.
y
=
-
2000
;
this
.
m_bubblesAll
.
push
(
bubble
)
this
.
bubblesAll
.
push
(
bubble
)
this
.
g_cartoon
.
subscribeTouchEvent
(
`bubble_
${
i
}
`
,
()
=>
{
console
.
log
(
"
d
"
)
this
.
disableClick
(
`bubble_
${
i
}
`
)
if
(
bubble
.
isRight
)
{
bubble
.
node
.
active
=
false
;
this
.
g_cartoon
.
playAudio
(
"
正确
"
);
this
.
m_rightAns
++
;
if
(
this
.
m_rightAns
>=
rightNum
)
{
this
.
m_stopMoving
=
true
;
this
.
addStar
(
_
=>
{
this
.
destroyBubbles
();
if
(
!
this
.
nextQuestion
())
{
this
.
endGame
()
this
.
enableClick
(
`bubble_
${
i
}
`
)
}
})
}
}
else
{
this
.
m_stopMoving
=
true
;
setTimeout
(()
=>
{
this
.
m_stopMoving
=
false
;
this
.
enableClick
(
`bubble_
${
i
}
`
)
},
1500
);
this
.
g_cartoon
.
playAudio
(
"
错误泡泡爆炸
"
);
}
},
true
)
}
}
return
true
;
}
}
resetPosition
()
{
destroyBubbles
()
{
let
node
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/speaker`
)
this
.
save
=
[]
node
.
x
=
-
cc
.
winSize
.
width
/
2
+
100
this
.
m_bubblesAll
.
forEach
(
item
=>
{
node
.
y
=
-
cc
.
winSize
.
height
/
2
+
100
if
(
!
item
.
move
.
fix
)
{
this
.
bubblesAll
.
push
({
node
:
node
,
move
:
{
this
.
g_cartoon
.
tweenChange
(
item
.
node
,
{
y
:
item
.
node
.
y
+
cc
.
winSize
.
height
},
1
,
()
=>
{
r
:
50
,
x
:
node
.
x
,
y
:
node
.
y
,
vX
:
0
,
vY
:
0
,
enable
:
true
,
fix
:
true
,
scale
:
1
,
id
:
999
,
lastId
:
null
item
.
node
.
destroy
()
}})
})
}
else
{
node
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/btn_back`
)
this
.
save
.
push
(
item
)
node
.
x
=
-
cc
.
winSize
.
width
/
2
+
60
}
node
.
y
=
cc
.
winSize
.
height
/
2
-
50
})
this
.
bubblesAll
.
push
({
node
:
node
,
move
:
{
this
.
m_bubblesAll
=
this
.
save
;
r
:
40
,
x
:
node
.
x
,
y
:
node
.
y
,
vX
:
0
,
vY
:
0
,
enable
:
true
,
fix
:
true
,
scale
:
1
,
id
:
998
,
lastId
:
null
}})
node
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/btn_restart`
)
node
.
x
=
0
node
.
y
=
20
// this.bubblesAll.push({node: node, move: {
// r: 90, x: node.x, y: node.y, vX: 0, vY: 0, enable: true, fix: true, scale: 1
// }})
node
=
this
.
g_cartoon
.
getNodeByPath
(
`Canvas/lion`
)
node
.
x
=
cc
.
winSize
.
width
/
2
-
150
node
.
y
=
-
cc
.
winSize
.
height
/
2
+
170
this
.
bubblesAll
.
push
({
node
:
node
,
move
:
{
r
:
90
,
x
:
node
.
x
,
y
:
node
.
y
,
vX
:
0
,
vY
:
0
,
enable
:
true
,
fix
:
true
,
scale
:
1
,
id
:
997
,
lastId
:
null
}})
}
}
releaseBubbles
()
{
releaseBubbles
()
{
const
pos
=
[
[
{
x
:
-
280
,
y
:
24
},
{
x
:
0
,
y
:
5
},
{
x
:
-
172
,
y
:
-
172
},
{
x
:
34
,
y
:
-
220
},
{
x
:
235
,
y
:
-
37
},
{
x
:
-
119
,
y
:
191
},
{
x
:
287
,
y
:
186
},
{
x
:
-
320
,
y
:
252
},
{
x
:
-
486
,
y
:
-
45
},
{
x
:
452
,
y
:
30
},
{
x
:
-
380
,
y
:
-
247
},
{
x
:
87
,
y
:
252
},
{
x
:
258
,
y
:
-
244
},
{
x
:
505
,
y
:
236
},
{
x
:
-
500
,
y
:
160
},
]
]
let
startx
=
cc
.
winSize
.
width
/
2
-
350
let
startx
=
cc
.
winSize
.
width
/
2
-
350
let
starty
=
-
cc
.
winSize
.
height
/
2
+
350
let
starty
=
-
cc
.
winSize
.
height
/
2
+
350
const
vArr
=
[
const
vArr
=
[
{
vX
:
-
5
,
vY
:
1
},
{
vX
:
-
5
,
vY
:
2
},
{
vX
:
-
5
,
vY
:
1
}
{
vX
:
-
0.5
,
vY
:
0.5
},
{
vX
:
0.5
,
vY
:
-
0.5
},
{
vX
:
-
0.5
,
vY
:
-
0.5
},
{
vX
:
0.5
,
vY
:
0.5
}
]
]
let
pAll
=
[]
// const pos = [
let
count
=
0
;
// {x: }
this
.
m_bubblesAll
.
forEach
(
bubble
=>
{
// ]
if
(
!
bubble
.
move
.
fix
)
{
this
.
bubblesAll
.
forEach
((
bubble
,
index
)
=>
{
let
_p
=
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
console
.
log
(
count
)
if
(
!
bubble
.
move
.
fix
)
{
bubble
.
node
.
x
=
pos
[
0
][
count
].
x
bubble
.
node
.
x
=
startx
bubble
.
node
.
y
=
pos
[
0
][
count
].
y
bubble
.
node
.
y
=
starty
bubble
.
move
.
x
=
pos
[
0
][
count
].
x
bubble
.
move
.
x
=
startx
bubble
.
move
.
y
=
pos
[
0
][
count
].
y
bubble
.
move
.
y
=
starty
bubble
.
move
.
vX
=
vArr
[
count
%
4
].
vX
bubble
.
move
.
vX
=
vArr
[
index
%
3
].
vX
bubble
.
move
.
vY
=
vArr
[
count
%
4
].
vY
bubble
.
move
.
vY
=
vArr
[
index
%
3
].
vY
bubble
.
move
.
scale
=
1
;
bubble
.
move
.
scale
=
0.3
;
bubble
.
node
.
scaleX
=
bubble
.
move
.
scale
;
bubble
.
node
.
scaleX
=
bubble
.
move
.
scale
;
bubble
.
node
.
scaleY
=
bubble
.
move
.
scale
;
bubble
.
node
.
scaleY
=
bubble
.
move
.
scale
;
// console.log(bubble.move.vX, bubble.move.vY)
count
++
;
resolve
()
})
pAll
.
push
(
_p
)
}
})
Promise
.
all
(
pAll
).
then
(
_
=>
{
this
.
m_bubblesAll
.
forEach
(
bubble
=>
{
if
(
!
bubble
.
move
.
fix
)
{
bubble
.
move
.
enable
=
true
;
bubble
.
move
.
enable
=
true
;
setTimeout
(()
=>
{
bubble
.
move
.
vX
=
-
1
*
(
Math
.
ceil
(
Math
.
random
()
*
10
)
/
10
)
},
1000
);
}
}
}
,
1500
*
index
);
}
)
})
})
}
}
endGame
()
{
const
btn_restart
=
this
.
g_cartoon
.
getCartoonElement
(
"
restart
"
)
console
.
log
(
btn_restart
.
node
)
this
.
g_cartoon
.
playAudio
(
"
撒花
"
)
this
.
g_cartoon
.
tweenChange
(
btn_restart
.
node
,
{
scale
:
1
},
0.3
,
_
=>
{
this
.
enableClick
(
"
Restart
"
)
})
}
restartGame
()
{
this
.
m_currentQuestion
=
-
1
;
this
.
m_currentQuestionIndex
=
-
1
;
this
.
m_rightAns
=
0
;
this
.
m_stopMoving
=
false
;
console
.
log
(
"
重新开始
"
,
this
.
nextQuestion
());
this
.
initStar
();
this
.
releaseBubbles
();
}
...
...
play/assets/tmpGame/script/Scene.js
View file @
2bd86de7
...
@@ -16,6 +16,14 @@ cc.Class({
...
@@ -16,6 +16,14 @@ cc.Class({
type
:
cc
.
Prefab
,
type
:
cc
.
Prefab
,
default
:
null
,
default
:
null
,
},
},
star
:
{
type
:
cc
.
Prefab
,
default
:
null
,
},
score
:
{
type
:
cc
.
Prefab
,
default
:
null
,
},
},
},
gameLogic
:
null
,
gameLogic
:
null
,
...
@@ -87,7 +95,9 @@ cc.Class({
...
@@ -87,7 +95,9 @@ cc.Class({
audioResList
:
this
.
_audioResList
,
audioResList
:
this
.
_audioResList
,
animaResList
:
this
.
_animaResList
,
animaResList
:
this
.
_animaResList
,
prefabs
:
{
prefabs
:
{
bubble
:
this
.
bubble
bubble
:
this
.
bubble
,
star
:
this
.
star
,
score
:
this
.
score
},
},
properties
:
{
properties
:
{
option
:
this
.
option
,
option
:
this
.
option
,
...
...
play/assets/tmpGame/textures/btn_restart.png
0 → 100644
View file @
2bd86de7
20.8 KB
play/assets/tmpGame/textures/btn_restart.png.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.3.5",
"uuid": "0601a05d-da6a-45e5-bc19-7dd339206079",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 436,
"height": 256,
"platformSettings": {},
"subMetas": {
"btn_restart": {
"ver": "1.0.4",
"uuid": "955b7ad5-9107-4588-8235-d652be51ace1",
"rawTextureUuid": "0601a05d-da6a-45e5-bc19-7dd339206079",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 436,
"height": 256,
"rawWidth": 436,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
play/assets/tmpGame/textures/多边形1拷贝.png
0 → 100644
View file @
2bd86de7
3.23 KB
play/assets/tmpGame/textures/多边形1拷贝.png.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.3.5",
"uuid": "caebfe0f-b246-41db-9ef6-395e80d10a5c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 62,
"height": 66,
"platformSettings": {},
"subMetas": {
"多边形1拷贝": {
"ver": "1.0.4",
"uuid": "e3fc5cc3-7007-4f39-a4f7-854a16e06883",
"rawTextureUuid": "caebfe0f-b246-41db-9ef6-395e80d10a5c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 62,
"height": 66,
"rawWidth": 62,
"rawHeight": 66,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
play/assets/tmpGame/textures/组21.png
0 → 100644
View file @
2bd86de7
14.7 KB
play/assets/tmpGame/textures/组21.png.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.3.5",
"uuid": "ad5a9b5e-56cd-4271-9a43-44afa49c9194",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 278,
"height": 275,
"platformSettings": {},
"subMetas": {
"组21": {
"ver": "1.0.4",
"uuid": "0d4e8ab5-1e48-4a70-b5f3-41ac05264cbf",
"rawTextureUuid": "ad5a9b5e-56cd-4271-9a43-44afa49c9194",
"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
play/assets/tmpGame/textures/组22.png
0 → 100644
View file @
2bd86de7
3.55 KB
play/assets/tmpGame/textures/组22.png.meta
0 → 100644
View file @
2bd86de7
{
"ver": "2.3.5",
"uuid": "9d817392-6611-414c-9c05-64da2564376f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 62,
"height": 69,
"platformSettings": {},
"subMetas": {
"组22": {
"ver": "1.0.4",
"uuid": "87136bc7-13f1-4c93-a705-396b8d9281b2",
"rawTextureUuid": "9d817392-6611-414c-9c05-64da2564376f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 62,
"height": 69,
"rawWidth": 62,
"rawHeight": 69,
"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