Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dap-hu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Vũ Gia Vương
dap-hu
Commits
22254b11
Commit
22254b11
authored
Mar 31, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sound
parent
07d5311e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
640 additions
and
246 deletions
+640
-246
main.fire
assets/main.fire
+593
-231
beer-bottle-rolling-on-a-sidewalk-82234.mp3
...sources/sound/beer-bottle-rolling-on-a-sidewalk-82234.mp3
+0
-0
Events.ts
assets/scripts/Events.ts
+3
-1
BuaController.ts
assets/scripts/GamePlay/BuaController.ts
+0
-2
HuController.ts
assets/scripts/GamePlay/HuController.ts
+24
-12
SoundManager.ts
assets/scripts/SoundManager.ts
+20
-0
No files found.
assets/main.fire
View file @
22254b11
...
...
@@ -75,28 +75,31 @@
"__id__": 5
},
{
"__id__":
9
"__id__":
11
},
{
"__id__": 5
1
"__id__": 5
5
},
{
"__id__": 6
0
"__id__": 6
4
},
{
"__id__": 2
5
"__id__": 2
7
},
{
"__id__": 62
"__id__": 66
},
{
"__id__": 79
}
],
"_active": true,
"_components": [
{
"__id__":
75
"__id__":
83
},
{
"__id__":
76
"__id__":
84
}
],
"_prefab": null,
...
...
@@ -255,6 +258,9 @@
"_children": [
{
"__id__": 6
},
{
"__id__": 9
}
],
"_active": true,
...
...
@@ -424,6 +430,101 @@
"_enabled": true,
"_id": "39zuJRYHhBcaDMrnfQY1oJ"
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 97.87,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
8.533,
896.03,
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": "f7ruMjtKFFRrIzM9iaGFgt"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "2aZUQ/RYZBu5GV6vCWiVM5"
},
{
"__type__": "cc.Node",
"_name": "StartScreen",
...
...
@@ -433,19 +534,19 @@
},
"_children": [
{
"__id__": 1
0
"__id__": 1
2
},
{
"__id__": 1
3
"__id__": 1
5
},
{
"__id__":
20
"__id__":
18
}
],
"_active": true,
"_components": [
{
"__id__": 2
3
"__id__": 2
5
}
],
"_prefab": null,
...
...
@@ -501,16 +602,16 @@
"_name": "hu-old",
"_objFlags": 0,
"_parent": {
"__id__":
9
"__id__":
11
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 1
1
"__id__": 1
3
},
{
"__id__": 1
2
"__id__": 1
4
}
],
"_prefab": null,
...
...
@@ -566,7 +667,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
0
"__id__": 1
2
},
"_enabled": true,
"_materials": [
...
...
@@ -608,27 +709,148 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
0
"__id__": 1
2
},
"_enabled": true,
"text": null,
"_id": "38z0bMJaVM5a4LWQUt9f2c"
},
{
"__type__": "cc.Node",
"_name": "hu-3s",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 16
},
{
"__id__": 17
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1080,
"height": 1920
},
"_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": "eewexCrNpPQYIe3pr94dUa"
},
{
"__type__": "ba0b5Nq4fNP4KvnrykIXx3T",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"text": {
"__id__": 10
},
"_id": "8elU/6mQdLuL2SP4MHIGJi"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"_materials": [
{
"__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3"
}
],
"paused": false,
"defaultSkin": "default",
"defaultAnimation": "",
"_preCacheMode": 0,
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_skeletonCache": null,
"_animationName": "",
"_animationQueue": [],
"_headAniInfo": null,
"_playTimes": 0,
"_isAniComplete": true,
"_N$skeletonData": {
"__uuid__": "94dfd4d1-2b3e-45dd-8797-089cef59f346"
},
"_N$_defaultCacheMode": 0,
"_N$debugSlots": false,
"_N$debugBones": false,
"_N$debugMesh": false,
"_N$useTint": false,
"_N$enableBatch": false,
"_id": "b7Sy0WB/JNm4kd67PFbAcQ"
},
{
"__type__": "cc.Node",
"_name": "SelectButton",
"_objFlags": 0,
"_parent": {
"__id__":
9
"__id__":
11
},
"_children": [
{
"__id__": 1
4
"__id__": 1
9
}
],
"_active": true,
"_components": [
{
"__id__":
19
"__id__":
24
}
],
"_prefab": null,
...
...
@@ -684,20 +906,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 1
3
"__id__": 1
8
},
"_children": [
{
"__id__":
15
"__id__":
20
}
],
"_active": true,
"_components": [
{
"__id__":
17
"__id__":
22
},
{
"__id__":
18
"__id__":
23
}
],
"_prefab": null,
...
...
@@ -753,13 +975,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 1
4
"__id__": 1
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
16
"__id__":
21
}
],
"_prefab": null,
...
...
@@ -815,7 +1037,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
15
"__id__":
20
},
"_enabled": true,
"_materials": [
...
...
@@ -848,7 +1070,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
4
"__id__": 1
9
},
"_enabled": true,
"_materials": [
...
...
@@ -880,7 +1102,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
4
"__id__": 1
9
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -907,7 +1129,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
3
"__id__": 1
8
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -980,25 +1202,57 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 1
4
"__id__": 1
9
},
"_id": "009jyGf0JGyaWytJquX/r/"
},
{
"__type__": "4cdbdL97VxHIokBkhUMm2qL",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"selectBtnNode": {
"__id__": 18
},
"contentNode": {
"__id__": 26
},
"checkedNode": {
"__id__": 34
},
"_id": "12WntYtI5C+bsPwyWnA236"
},
{
"__type__": "cc.Node",
"_name": "
hu-3s
",
"_name": "
Conttent
",
"_objFlags": 0,
"_parent": {
"__id__":
9
"__id__":
27
},
"_children": [],
"_children": [
{
"__id__": 45
},
{
"__id__": 47
},
{
"__id__": 49
},
{
"__id__": 51
}
],
"_active": true,
"_components": [
{
"__id__":
21
"__id__":
53
},
{
"__id__":
22
"__id__":
54
}
],
"_prefab": null,
...
...
@@ -1012,8 +1266,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
108
0,
"height":
192
0
"width":
90
0,
"height":
90
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -1025,7 +1279,7 @@
"ctor": "Float64Array",
"array": [
0,
0
,
27.843
,
0,
0,
0,
...
...
@@ -1047,107 +1301,42 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
eewexCrNpPQYIe3pr94dUa
"
"_id": "
1aG9M1jPtMPKXUL2HUZRRR
"
},
{
"__type__": "
sp.Skeleton
",
"_name": "",
"__type__": "
cc.Node
",
"_name": "
SelectPopup
",
"_objFlags": 0,
"node": {
"__id__": 20
},
"_enabled": true,
"_materials": [
{
"__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3"
}
],
"paused": false,
"defaultSkin": "default",
"defaultAnimation": "",
"_preCacheMode": 0,
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_skeletonCache": null,
"_animationName": "",
"_animationQueue": [],
"_headAniInfo": null,
"_playTimes": 0,
"_isAniComplete": true,
"_N$skeletonData": {
"__uuid__": "94dfd4d1-2b3e-45dd-8797-089cef59f346"
},
"_N$_defaultCacheMode": 0,
"_N$debugSlots": false,
"_N$debugBones": false,
"_N$debugMesh": false,
"_N$useTint": false,
"_N$enableBatch": false,
"_id": "b7Sy0WB/JNm4kd67PFbAcQ"
"_parent": {
"__id__": 2
},
"_children": [
{
"__type__": "ba0b5Nq4fNP4KvnrykIXx3T",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
},
"_enabled": true,
"_id": "8elU/6mQdLuL2SP4MHIGJi"
"__id__": 28
},
{
"__type__": "4cdbdL97VxHIokBkhUMm2qL",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"selectBtnNode": {
"__id__": 13
},
"contentNode": {
"__id__": 24
},
"checkedNode": {
"__id__": 30
},
"_id": "12WntYtI5C+bsPwyWnA236"
},
{
"__type__": "cc.Node",
"_name": "Conttent",
"_objFlags": 0,
"_parent": {
"__id__": 25
},
"_children": [
{
"__id__":
41
"__id__":
32
},
{
"__id__":
43
"__id__":
26
},
{
"__id__":
45
"__id__":
34
},
{
"__id__":
47
"__id__":
36
}
],
"_active": true,
"_components": [
{
"__id__": 4
9
"__id__": 4
3
},
{
"__id__":
50
"__id__":
44
}
],
"_prefab": null,
...
...
@@ -1161,8 +1350,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
90
0,
"height":
90
0
"width":
108
0,
"height":
192
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -1173,8 +1362,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1500,
0,
27.843,
0,
0,
0,
...
...
@@ -1196,43 +1385,24 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
1aG9M1jPtMPKXUL2HUZRRR
"
"_id": "
d2GrP6m8tNbqdZei6646F9
"
},
{
"__type__": "cc.Node",
"_name": "
SelectPopup
",
"_name": "
Mask
",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 26
},
{
"__id__": 28
},
{
"__id__": 24
},
{
"__id__": 30
"__id__": 27
},
{
"__id__": 32
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
},
{
"__id__": 40
"__id__": 29
}
],
"_prefab": null,
"_opacity":
255
,
"_opacity":
53
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -1254,7 +1424,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
150
0,
0,
0,
0,
0,
...
...
@@ -1277,20 +1447,52 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d2GrP6m8tNbqdZei6646F9"
"_id": "4cetMS/9ZO7KGU/kkgYiJi"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "555pnsH9pOGaevY8hqRUtD"
},
{
"__type__": "cc.Node",
"_name": "BG",
"_objFlags": 0,
"_parent": {
"__id__": 2
5
"__id__": 2
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
27
"__id__":
31
}
],
"_prefab": null,
...
...
@@ -1346,7 +1548,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
26
"__id__":
30
},
"_enabled": true,
"_materials": [
...
...
@@ -1378,13 +1580,13 @@
"_name": "Title",
"_objFlags": 0,
"_parent": {
"__id__": 2
5
"__id__": 2
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
29
"__id__":
33
}
],
"_prefab": null,
...
...
@@ -1440,7 +1642,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
28
"__id__":
32
},
"_enabled": true,
"_materials": [
...
...
@@ -1473,13 +1675,13 @@
"_name": "Checked",
"_objFlags": 0,
"_parent": {
"__id__": 2
5
"__id__": 2
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
1
"__id__": 3
5
}
],
"_prefab": null,
...
...
@@ -1535,7 +1737,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
0
"__id__": 3
4
},
"_enabled": true,
"_materials": [
...
...
@@ -1567,17 +1769,17 @@
"_name": "OkButton",
"_objFlags": 0,
"_parent": {
"__id__": 2
5
"__id__": 2
7
},
"_children": [
{
"__id__": 3
3
"__id__": 3
7
}
],
"_active": true,
"_components": [
{
"__id__":
38
"__id__":
42
}
],
"_prefab": null,
...
...
@@ -1633,20 +1835,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 3
2
"__id__": 3
6
},
"_children": [
{
"__id__": 3
4
"__id__": 3
8
}
],
"_active": true,
"_components": [
{
"__id__":
36
"__id__":
40
},
{
"__id__":
37
"__id__":
41
}
],
"_prefab": null,
...
...
@@ -1702,13 +1904,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 3
3
"__id__": 3
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
5
"__id__": 3
9
}
],
"_prefab": null,
...
...
@@ -1764,7 +1966,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
4
"__id__": 3
8
},
"_enabled": true,
"_materials": [
...
...
@@ -1797,7 +1999,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
3
"__id__": 3
7
},
"_enabled": true,
"_materials": [
...
...
@@ -1829,7 +2031,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
3
"__id__": 3
7
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1856,7 +2058,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
2
"__id__": 3
6
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -1929,7 +2131,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 3
3
"__id__": 3
7
},
"_id": "e8Z5R1m9xLJZ0M9KGeyDSC"
},
...
...
@@ -1938,7 +2140,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
5
"__id__": 2
7
},
"_enabled": true,
"_id": "f1aq5xMrVN341tWAhOykW0"
...
...
@@ -1948,7 +2150,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
5
"__id__": 2
7
},
"_enabled": true,
"_id": "69dYJ1wBlP5Z6QRZCRykh8"
...
...
@@ -1958,13 +2160,13 @@
"_name": "Bua",
"_objFlags": 0,
"_parent": {
"__id__": 2
4
"__id__": 2
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
2
"__id__": 4
6
}
],
"_prefab": null,
...
...
@@ -2020,7 +2222,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
1
"__id__": 4
5
},
"_enabled": true,
"_materials": [
...
...
@@ -2062,13 +2264,13 @@
"_name": "ga",
"_objFlags": 0,
"_parent": {
"__id__": 2
4
"__id__": 2
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
4
"__id__": 4
8
}
],
"_prefab": null,
...
...
@@ -2124,7 +2326,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
3
"__id__": 4
7
},
"_enabled": true,
"_materials": [
...
...
@@ -2166,13 +2368,13 @@
"_name": "gai lung",
"_objFlags": 0,
"_parent": {
"__id__": 2
4
"__id__": 2
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
46
"__id__":
50
}
],
"_prefab": null,
...
...
@@ -2228,7 +2430,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
5
"__id__": 4
9
},
"_enabled": true,
"_materials": [
...
...
@@ -2270,13 +2472,13 @@
"_name": "gay",
"_objFlags": 0,
"_parent": {
"__id__": 2
4
"__id__": 2
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
48
"__id__":
52
}
],
"_prefab": null,
...
...
@@ -2332,7 +2534,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
47
"__id__":
51
},
"_enabled": true,
"_materials": [
...
...
@@ -2374,7 +2576,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
4
"__id__": 2
6
},
"_enabled": false,
"_materials": [
...
...
@@ -2406,7 +2608,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
4
"__id__": 2
6
},
"_enabled": true,
"_layoutSize": {
...
...
@@ -2442,16 +2644,16 @@
},
"_children": [
{
"__id__": 5
2
"__id__": 5
6
},
{
"__id__": 5
5
"__id__": 5
9
}
],
"_active": true,
"_components": [
{
"__id__":
59
"__id__":
63
}
],
"_prefab": null,
...
...
@@ -2507,16 +2709,16 @@
"_name": "Chum",
"_objFlags": 0,
"_parent": {
"__id__": 5
1
"__id__": 5
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
3
"__id__": 5
7
},
{
"__id__": 5
4
"__id__": 5
8
}
],
"_prefab": null,
...
...
@@ -2572,7 +2774,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
2
"__id__": 5
6
},
"_enabled": true,
"_materials": [
...
...
@@ -2614,7 +2816,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
2
"__id__": 5
6
},
"_enabled": true,
"_id": "32Nb7fXTdNIYe2FGNiHQD8"
...
...
@@ -2624,11 +2826,11 @@
"_name": "buaPos",
"_objFlags": 0,
"_parent": {
"__id__": 5
1
"__id__": 5
5
},
"_children": [
{
"__id__":
56
"__id__":
60
}
],
"_active": true,
...
...
@@ -2686,16 +2888,16 @@
"_name": "Bua",
"_objFlags": 0,
"_parent": {
"__id__": 5
5
"__id__": 5
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
57
"__id__":
61
},
{
"__id__":
58
"__id__":
62
}
],
"_prefab": null,
...
...
@@ -2751,11 +2953,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
56
"__id__":
60
},
"_enabled": true,
"chumNode": {
"__id__": 5
2
"__id__": 5
6
},
"_id": "de4Eqj7wlDIqqcvtH5WY/o"
},
...
...
@@ -2764,7 +2966,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
56
"__id__":
60
},
"_enabled": true,
"_materials": [
...
...
@@ -2806,7 +3008,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
1
"__id__": 5
5
},
"_enabled": true,
"_id": "45yzC1EPtJP4Z8W/DF1iwD"
...
...
@@ -2822,7 +3024,7 @@
"_active": false,
"_components": [
{
"__id__": 6
1
"__id__": 6
5
}
],
"_prefab": null,
...
...
@@ -2878,7 +3080,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
0
"__id__": 6
4
},
"_enabled": true,
"_id": "96hHP+ssxLNpn8/i2AKAyI"
...
...
@@ -2892,19 +3094,19 @@
},
"_children": [
{
"__id__": 6
3
"__id__": 6
7
},
{
"__id__":
66
"__id__":
70
}
],
"_active": true,
"_components": [
{
"__id__": 7
3
"__id__": 7
7
},
{
"__id__": 7
4
"__id__": 7
8
}
],
"_prefab": null,
...
...
@@ -2960,16 +3162,16 @@
"_name": "The",
"_objFlags": 0,
"_parent": {
"__id__": 6
2
"__id__": 6
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
4
"__id__": 6
8
},
{
"__id__": 6
5
"__id__": 6
9
}
],
"_prefab": null,
...
...
@@ -3025,7 +3227,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
3
"__id__": 6
7
},
"_enabled": true,
"_materials": [
...
...
@@ -3067,7 +3269,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
3
"__id__": 6
7
},
"_enabled": true,
"_id": "8aU9CpQKRFmJMSMUCpaItu"
...
...
@@ -3077,17 +3279,17 @@
"_name": "Replay Button",
"_objFlags": 0,
"_parent": {
"__id__": 6
2
"__id__": 6
6
},
"_children": [
{
"__id__":
67
"__id__":
71
}
],
"_active": true,
"_components": [
{
"__id__": 7
2
"__id__": 7
6
}
],
"_prefab": null,
...
...
@@ -3143,20 +3345,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__":
66
"__id__":
70
},
"_children": [
{
"__id__":
68
"__id__":
72
}
],
"_active": true,
"_components": [
{
"__id__": 7
0
"__id__": 7
4
},
{
"__id__": 7
1
"__id__": 7
5
}
],
"_prefab": null,
...
...
@@ -3212,13 +3414,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__":
67
"__id__":
71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
69
"__id__":
73
}
],
"_prefab": null,
...
...
@@ -3274,7 +3476,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
68
"__id__":
72
},
"_enabled": true,
"_materials": [
...
...
@@ -3307,7 +3509,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
67
"__id__":
71
},
"_enabled": true,
"_materials": [
...
...
@@ -3339,7 +3541,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
67
"__id__":
71
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -3366,7 +3568,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
66
"__id__":
70
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3439,7 +3641,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__":
67
"__id__":
71
},
"_id": "adCMRaOEVD5LOjd7MAm9EO"
},
...
...
@@ -3448,7 +3650,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
2
"__id__": 6
6
},
"_enabled": true,
"_id": "bcaw0ZNyRPGoK8ATotq1yF"
...
...
@@ -3458,11 +3660,171 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
2
"__id__": 6
6
},
"_enabled": true,
"_id": "17J7OqMb1NsbF4iJiNTrDS"
},
{
"__type__": "cc.Node",
"_name": "SoundManager",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 80
}
],
"_active": true,
"_components": [
{
"__id__": 82
}
],
"_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": "ffZwVfmQtF65+0k7Exx3Mu"
},
{
"__type__": "cc.Node",
"_name": "beer-bottle-rolling-on-a-sidewalk-82234",
"_objFlags": 0,
"_parent": {
"__id__": 79
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 81
}
],
"_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": "82Xe7qI0hPzbdi7q+tWuGf"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
},
"_enabled": true,
"_clip": {
"__uuid__": "639035b2-15a3-4a79-ac7f-abd23df23aff"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "47ldRFoVBIiIz8lx71RIrx"
},
{
"__type__": "bccdbjIIvVBZoLltHmAttIC",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 79
},
"_enabled": true,
"rollingSound": {
"__id__": 81
},
"_id": "a5vu6IE1ROn6VO7UPM9J3p"
},
{
"__type__": "cc.Canvas",
"_name": "",
...
...
assets/resources/sound/beer-bottle-rolling-on-a-sidewalk-82234.mp3
0 → 100644
View file @
22254b11
File added
assets/scripts/Events.ts
View file @
22254b11
...
...
@@ -6,3 +6,5 @@ export const SHOW_START_SCREEN = 'SHOW_START_SCREEN';
export
const
SHOW_CARD_POPUP
=
'SHOW_CARD_POPUP'
;
export
const
STOP_ANIM_CHUM
=
'STOP_ANIM_CHUM'
;
export
const
SHOW_SELECT_POPUP
=
'SHOW_SELECT_POPUP'
;
export
const
PLAY_ROLLING_SOUND
=
'PLAY_ROLLING_SOUND'
;
\ No newline at end of file
assets/scripts/GamePlay/BuaController.ts
View file @
22254b11
...
...
@@ -20,7 +20,6 @@ export default class BuaController extends cc.Component {
this
.
_chumCtrl
=
this
.
chumNode
.
getComponent
(
ChumController
);
this
.
spine
=
this
.
node
.
getComponent
(
sp
.
Skeleton
);
// this.spine.setSkin(this._skins[this.index % this._skins.length]);
this
.
spine
.
setSkin
(
'Bua'
);
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
...
...
@@ -33,7 +32,6 @@ export default class BuaController extends cc.Component {
private
onTouchStart
():
void
{
this
.
_actions
[
this
.
_count
].
bind
(
this
)();
console
.
log
(
'this._count'
,
this
.
_count
)
this
.
_count
=
(
this
.
_count
+
1
)
%
this
.
_actions
.
length
;
}
...
...
assets/scripts/GamePlay/HuController.ts
View file @
22254b11
import
{
eventTarget
,
PLAY_ROLLING_SOUND
}
from
"../Events"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
default
class
HuController
extends
cc
.
Component
{
@
property
(
cc
.
Label
)
private
text
:
cc
.
Label
=
null
;
private
spine
:
sp
.
Skeleton
=
null
;
...
...
@@ -16,16 +19,17 @@ export default class HuController extends cc.Component {
protected
onLoad
():
void
{
this
.
spine
=
this
.
node
.
getComponent
(
sp
.
Skeleton
);
// this.setRotateAnim();
// this.node.on(cc.Node.EventType.TOUCH_START, this.toggleAnim, this);
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onTouchEnd
,
this
)
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
,
this
.
onTouchMove
,
this
)
this
.
spine
.
setCompleteListener
(()
=>
this
.
setRotateAnim
());
this
.
scheduleOnce
(()
=>
this
.
testDevice
,
1
);
}
protected
start
():
void
{
this
.
scheduleOnce
(()
=>
this
.
testDevice
,
1
);
console
.
log
(
'testDevice'
,)
}
private
testDevice
()
{
...
...
@@ -33,6 +37,10 @@ export default class HuController extends cc.Component {
if
(
!
event
.
accelerationIncludingGravity
)
{
return
;
}
this
.
text
.
string
=
`
x:
${
event
.
accelerationIncludingGravity
.
x
}
,
y:
${
event
.
accelerationIncludingGravity
.
y
}
,
z:
${
event
.
accelerationIncludingGravity
.
z
}
`
;
const
x
=
event
.
accelerationIncludingGravity
.
x
;
const
y
=
event
.
accelerationIncludingGravity
.
y
;
...
...
@@ -58,6 +66,17 @@ export default class HuController extends cc.Component {
if
(
this
.
_count
>
5
)
{
this
.
_count
=
0
;
this
.
shakeBottle
();
}
this
.
_x
=
x
;
this
.
_y
=
y
;
this
.
_z
=
z
;
});
}
private
shakeBottle
()
{
eventTarget
.
emit
(
PLAY_ROLLING_SOUND
);
cc
.
tween
(
this
.
node
)
.
to
(
0.2
,
{
position
:
cc
.
v3
(
20
,
0
,
0
)
})
.
to
(
0.2
,
{
position
:
cc
.
v3
(
-
20
,
0
,
0
)
})
...
...
@@ -67,13 +86,6 @@ export default class HuController extends cc.Component {
.
start
();
}
this
.
_x
=
x
;
this
.
_y
=
y
;
this
.
_z
=
z
;
});
}
private
onTouchStart
(
event
:
cc
.
Event
.
EventTouch
):
void
{
if
(
!
this
.
_pointStart
)
{
this
.
setRotateAnim
();
...
...
assets/scripts/SoundManager.ts
0 → 100644
View file @
22254b11
import
{
eventTarget
,
PLAY_ROLLING_SOUND
}
from
"./Events"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
default
class
NewClass
extends
cc
.
Component
{
@
property
(
cc
.
AudioSource
)
private
rollingSound
:
cc
.
AudioSource
=
null
;
onLoad
()
{
eventTarget
.
on
(
PLAY_ROLLING_SOUND
,
this
.
playRollingSound
,
this
);
}
private
playRollingSound
()
{
this
.
rollingSound
.
play
();
}
}
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