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
b13dc8a7
Commit
b13dc8a7
authored
Apr 29, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update shake behind fragment
parent
de9d9ed7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
426 additions
and
364 deletions
+426
-364
main.fire
assets/main.fire
+352
-338
Events.ts
assets/scripts/Events.ts
+2
-1
BehindFragment.ts
assets/scripts/GamePlay/BehindFragment.ts
+15
-1
BreakingBottleController.ts
assets/scripts/GamePlay/BreakingBottleController.ts
+2
-2
BreakingJarController.ts
assets/scripts/GamePlay/BreakingJarController.ts
+22
-10
FragmentController.ts
assets/scripts/GamePlay/FragmentController.ts
+2
-2
FragmentJarController.ts
assets/scripts/GamePlay/FragmentJarController.ts
+31
-10
No files found.
assets/main.fire
View file @
b13dc8a7
...
...
@@ -546,10 +546,16 @@
"__id__": 14
},
{
"__id__": 1
41
"__id__": 1
37
},
{
"__id__": 212
"__id__": 208
},
{
"__id__": 211
},
{
"__id__": 134
}
],
"_active": true,
...
...
@@ -719,18 +725,12 @@
},
{
"__id__": 65
},
{
"__id__": 133
},
{
"__id__": 137
}
],
"_active": true,
"_components": [
{
"__id__": 1
40
"__id__": 1
33
}
],
"_prefab": null,
...
...
@@ -5353,7 +5353,7 @@
"fragmentLink": {
"__id__": 125
},
"isBottom":
fals
e,
"isBottom":
tru
e,
"_id": "00/WS6Zv1Pd6OfigrGm9ii"
},
{
...
...
@@ -5722,188 +5722,48 @@
"_id": "94iB2JXGBJC5Ydofx4LAfT"
},
{
"__type__": "
cc.Node
",
"_name": "
Tutorial Tap copy
",
"__type__": "
ae421EJQO1Mb6Dbqf2y4QlV
",
"_name": "",
"_objFlags": 0,
"
_parent
": {
"
node
": {
"__id__": 14
},
"_children": [
"_enabled": true,
"fragmentSpecialNodes": [
{
"__id__": 134
}
],
"_active": true,
"_components": [
"__id__": 89
},
{
"__id__": 136
}
],
"_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": [
-400,
-400,
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": "96h6U6dtZD6Lsp+t7kpiU5"
},
{
"__type__": "cc.Node",
"_name": "hand",
"_objFlags": 0,
"_parent": {
"__id__": 133
},
"_children": [],
"_active": true,
"_components": [
"__id__": 95
},
{
"__id__": 135
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 215,
"height": 291
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_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": "5aRNyVMmZLl6mrjVAYwBpb"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 134
},
"_enabled": true,
"_materials": [
"__id__": 103
},
{
"__
uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__
id__": 105
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "bb4b8653-efdf-49ce-b06e-3e199eddbc6f"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"hammerNode": {
"__id__": 134
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "fe72MFyJ5O4o2xsl7iZ9iF"
},
{
"__type__": "2c2cbdHwQFCdpQMA/zXzBGt",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 133
"behindJar": {
"__id__": 17
},
"_enabled": true,
"_id": "18syyvxH5BArzqvql50K+S"
"_id": "afSV19m55K3ZisD87MwN8y"
},
{
"__type__": "cc.Node",
"_name": "Hammer",
"_objFlags": 0,
"_parent": {
"__id__": 1
4
"__id__": 1
1
},
"_children": [
{
"__id__": 13
8
"__id__": 13
5
}
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [],
"_prefab": null,
"_opacity": 255,
...
...
@@ -5958,13 +5818,13 @@
"_name": "Bua",
"_objFlags": 0,
"_parent": {
"__id__": 13
7
"__id__": 13
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
9
"__id__": 13
6
}
],
"_prefab": null,
...
...
@@ -6020,7 +5880,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
8
"__id__": 13
5
},
"_enabled": true,
"_materials": [
...
...
@@ -6057,22 +5917,6 @@
"_N$enableBatch": false,
"_id": "1aE3N4xspBUqI/yFdTvs1G"
},
{
"__type__": "ae421EJQO1Mb6Dbqf2y4QlV",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"hammerNode": {
"__id__": 137
},
"behindJar": {
"__id__": 17
},
"_id": "afSV19m55K3ZisD87MwN8y"
},
{
"__type__": "cc.Node",
"_name": "BottleController",
...
...
@@ -6082,22 +5926,22 @@
},
"_children": [
{
"__id__": 1
42
"__id__": 1
38
},
{
"__id__": 1
91
"__id__": 1
87
},
{
"__id__": 20
4
"__id__": 20
0
},
{
"__id__": 20
8
"__id__": 20
4
}
],
"_active": false,
"_components": [
{
"__id__": 2
11
"__id__": 2
07
}
],
"_prefab": null,
...
...
@@ -6153,38 +5997,38 @@
"_name": "Body",
"_objFlags": 0,
"_parent": {
"__id__": 1
41
"__id__": 1
37
},
"_children": [
{
"__id__": 1
43
"__id__": 1
39
},
{
"__id__": 1
52
"__id__": 1
48
},
{
"__id__": 1
61
"__id__": 1
57
},
{
"__id__": 1
70
"__id__": 1
66
},
{
"__id__": 16
4
"__id__": 16
0
},
{
"__id__": 1
73
"__id__": 1
69
},
{
"__id__": 14
6
"__id__": 14
2
},
{
"__id__": 17
9
"__id__": 17
5
},
{
"__id__": 15
5
"__id__": 15
1
},
{
"__id__": 18
5
"__id__": 18
1
}
],
"_active": true,
...
...
@@ -6242,16 +6086,16 @@
"_name": "Layer 2",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
4
"__id__": 14
0
},
{
"__id__": 14
5
"__id__": 14
1
}
],
"_prefab": null,
...
...
@@ -6307,7 +6151,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
43
"__id__": 1
39
},
"_enabled": true,
"_materials": [
...
...
@@ -6339,11 +6183,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
43
"__id__": 1
39
},
"_enabled": true,
"frontSideNode": {
"__id__": 14
6
"__id__": 14
2
},
"_id": "69BFmvun1Bx65lw3QiQhXS"
},
...
...
@@ -6352,25 +6196,25 @@
"_name": "2",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
7
"__id__": 14
3
},
{
"__id__": 14
8
"__id__": 14
4
},
{
"__id__": 14
9
"__id__": 14
5
},
{
"__id__": 1
50
"__id__": 1
46
},
{
"__id__": 1
51
"__id__": 1
47
}
],
"_prefab": null,
...
...
@@ -6426,7 +6270,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
6
"__id__": 14
2
},
"_enabled": true,
"_materials": [
...
...
@@ -6458,7 +6302,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
6
"__id__": 14
2
},
"_enabled": true,
"_id": "63ZB/kFSVEKavLaqo0Hp3l"
...
...
@@ -6468,7 +6312,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
6
"__id__": 14
2
},
"_enabled": true,
"tag": 0,
...
...
@@ -6571,7 +6415,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
6
"__id__": 14
2
},
"_enabled": true,
"_type": 0,
...
...
@@ -6596,7 +6440,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
6
"__id__": 14
2
},
"_enabled": true,
"tag": 0,
...
...
@@ -6639,16 +6483,16 @@
"_name": "Layer 1",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
53
"__id__": 1
49
},
{
"__id__": 15
4
"__id__": 15
0
}
],
"_prefab": null,
...
...
@@ -6704,7 +6548,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
52
"__id__": 1
48
},
"_enabled": true,
"_materials": [
...
...
@@ -6736,11 +6580,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
52
"__id__": 1
48
},
"_enabled": true,
"frontSideNode": {
"__id__": 15
5
"__id__": 15
1
},
"_id": "e4+CUPuhxCiJuIp7Cf2Wo7"
},
...
...
@@ -6749,25 +6593,25 @@
"_name": "1",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
6
"__id__": 15
2
},
{
"__id__": 15
7
"__id__": 15
3
},
{
"__id__": 15
8
"__id__": 15
4
},
{
"__id__": 15
9
"__id__": 15
5
},
{
"__id__": 1
60
"__id__": 1
56
}
],
"_prefab": null,
...
...
@@ -6823,7 +6667,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
5
"__id__": 15
1
},
"_enabled": true,
"_materials": [
...
...
@@ -6855,7 +6699,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
5
"__id__": 15
1
},
"_enabled": true,
"tag": 0,
...
...
@@ -6958,7 +6802,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
5
"__id__": 15
1
},
"_enabled": true,
"_id": "bcmluUpTRPK6hZlUXAbqw5"
...
...
@@ -6968,7 +6812,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
5
"__id__": 15
1
},
"_enabled": true,
"_type": 0,
...
...
@@ -6993,7 +6837,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
5
"__id__": 15
1
},
"_enabled": true,
"tag": 0,
...
...
@@ -7036,16 +6880,16 @@
"_name": "6 copy 2",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
62
"__id__": 1
58
},
{
"__id__": 1
63
"__id__": 1
59
}
],
"_prefab": null,
...
...
@@ -7101,7 +6945,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
61
"__id__": 1
57
},
"_enabled": true,
"_materials": [
...
...
@@ -7133,11 +6977,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
61
"__id__": 1
57
},
"_enabled": true,
"frontSideNode": {
"__id__": 16
4
"__id__": 16
0
},
"_id": "acBtVoi9FB3q7725ApLFYT"
},
...
...
@@ -7146,25 +6990,25 @@
"_name": "6",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 16
5
"__id__": 16
1
},
{
"__id__": 16
6
"__id__": 16
2
},
{
"__id__": 16
7
"__id__": 16
3
},
{
"__id__": 16
8
"__id__": 16
4
},
{
"__id__": 16
9
"__id__": 16
5
}
],
"_prefab": null,
...
...
@@ -7220,7 +7064,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
4
"__id__": 16
0
},
"_enabled": true,
"_id": "cfh1jBullN7JO53xK2NK9d"
...
...
@@ -7230,7 +7074,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
4
"__id__": 16
0
},
"_enabled": true,
"_materials": [
...
...
@@ -7262,7 +7106,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
4
"__id__": 16
0
},
"_enabled": true,
"tag": 0,
...
...
@@ -7330,7 +7174,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
4
"__id__": 16
0
},
"_enabled": true,
"_type": 0,
...
...
@@ -7355,7 +7199,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
4
"__id__": 16
0
},
"_enabled": true,
"tag": 0,
...
...
@@ -7398,16 +7242,16 @@
"_name": "3 copy 2",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
71
"__id__": 1
67
},
{
"__id__": 1
72
"__id__": 1
68
}
],
"_prefab": null,
...
...
@@ -7463,7 +7307,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
70
"__id__": 1
66
},
"_enabled": true,
"_materials": [
...
...
@@ -7495,11 +7339,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
70
"__id__": 1
66
},
"_enabled": true,
"frontSideNode": {
"__id__": 1
73
"__id__": 1
69
},
"_id": "98YFrrFkNJ3J0xFfBbmnqJ"
},
...
...
@@ -7508,25 +7352,25 @@
"_name": "3",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 17
4
"__id__": 17
0
},
{
"__id__": 17
5
"__id__": 17
1
},
{
"__id__": 17
6
"__id__": 17
2
},
{
"__id__": 17
7
"__id__": 17
3
},
{
"__id__": 17
8
"__id__": 17
4
}
],
"_prefab": null,
...
...
@@ -7582,7 +7426,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
73
"__id__": 1
69
},
"_enabled": true,
"_materials": [
...
...
@@ -7614,7 +7458,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
73
"__id__": 1
69
},
"_enabled": true,
"_id": "4f6Dt6/09FwL+yIiIkzOdP"
...
...
@@ -7624,7 +7468,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
73
"__id__": 1
69
},
"_enabled": true,
"tag": 0,
...
...
@@ -7722,7 +7566,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
73
"__id__": 1
69
},
"_enabled": true,
"_type": 0,
...
...
@@ -7747,7 +7591,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
73
"__id__": 1
69
},
"_enabled": true,
"tag": 0,
...
...
@@ -7790,25 +7634,25 @@
"_name": "4",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
80
"__id__": 1
76
},
{
"__id__": 1
81
"__id__": 1
77
},
{
"__id__": 1
82
"__id__": 1
78
},
{
"__id__": 1
83
"__id__": 1
79
},
{
"__id__": 18
4
"__id__": 18
0
}
],
"_prefab": null,
...
...
@@ -7864,7 +7708,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
9
"__id__": 17
5
},
"_enabled": true,
"_materials": [
...
...
@@ -7896,7 +7740,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
9
"__id__": 17
5
},
"_enabled": true,
"_id": "21oKTWFXpPAbnbcJMb9BD0"
...
...
@@ -7906,7 +7750,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
9
"__id__": 17
5
},
"_enabled": true,
"tag": 0,
...
...
@@ -8029,7 +7873,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
9
"__id__": 17
5
},
"_enabled": true,
"_type": 0,
...
...
@@ -8054,7 +7898,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
9
"__id__": 17
5
},
"_enabled": true,
"tag": 0,
...
...
@@ -8097,25 +7941,25 @@
"_name": "5",
"_objFlags": 0,
"_parent": {
"__id__": 1
42
"__id__": 1
38
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 18
6
"__id__": 18
2
},
{
"__id__": 18
7
"__id__": 18
3
},
{
"__id__": 18
8
"__id__": 18
4
},
{
"__id__": 18
9
"__id__": 18
5
},
{
"__id__": 1
90
"__id__": 1
86
}
],
"_prefab": null,
...
...
@@ -8171,7 +8015,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
5
"__id__": 18
1
},
"_enabled": true,
"_id": "68uH5Wy0NHeJJxTq87yA/F"
...
...
@@ -8181,7 +8025,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
5
"__id__": 18
1
},
"_enabled": true,
"_materials": [
...
...
@@ -8213,7 +8057,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
5
"__id__": 18
1
},
"_enabled": true,
"tag": 0,
...
...
@@ -8321,7 +8165,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
5
"__id__": 18
1
},
"_enabled": true,
"_type": 0,
...
...
@@ -8346,7 +8190,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
5
"__id__": 18
1
},
"_enabled": true,
"tag": 0,
...
...
@@ -8389,14 +8233,14 @@
"_name": "Nap",
"_objFlags": 0,
"_parent": {
"__id__": 1
41
"__id__": 1
37
},
"_children": [
{
"__id__": 1
92
"__id__": 1
88
},
{
"__id__": 19
8
"__id__": 19
4
}
],
"_active": true,
...
...
@@ -8454,25 +8298,25 @@
"_name": "nap 2",
"_objFlags": 0,
"_parent": {
"__id__": 1
91
"__id__": 1
87
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
93
"__id__": 1
89
},
{
"__id__": 19
4
"__id__": 19
0
},
{
"__id__": 19
5
"__id__": 19
1
},
{
"__id__": 19
6
"__id__": 19
2
},
{
"__id__": 19
7
"__id__": 19
3
}
],
"_prefab": null,
...
...
@@ -8528,7 +8372,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
92
"__id__": 1
88
},
"_enabled": true,
"_materials": [
...
...
@@ -8560,7 +8404,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
92
"__id__": 1
88
},
"_enabled": true,
"tag": 0,
...
...
@@ -8708,7 +8552,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
92
"__id__": 1
88
},
"_enabled": true,
"_id": "66j+VkXfpNoadfW56880/G"
...
...
@@ -8718,7 +8562,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
92
"__id__": 1
88
},
"_enabled": true,
"_type": 0,
...
...
@@ -8743,7 +8587,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
92
"__id__": 1
88
},
"_enabled": true,
"tag": 0,
...
...
@@ -8786,25 +8630,25 @@
"_name": "nap 1",
"_objFlags": 0,
"_parent": {
"__id__": 1
91
"__id__": 1
87
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 19
9
"__id__": 19
5
},
{
"__id__":
200
"__id__":
196
},
{
"__id__":
201
"__id__":
197
},
{
"__id__":
202
"__id__":
198
},
{
"__id__":
203
"__id__":
199
}
],
"_prefab": null,
...
...
@@ -8860,7 +8704,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
8
"__id__": 19
4
},
"_enabled": true,
"_materials": [
...
...
@@ -8892,7 +8736,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
8
"__id__": 19
4
},
"_enabled": true,
"_id": "24D4XJuZlE+q6fQu9Zy6vU"
...
...
@@ -8902,7 +8746,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
8
"__id__": 19
4
},
"_enabled": true,
"tag": 0,
...
...
@@ -9010,7 +8854,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
8
"__id__": 19
4
},
"_enabled": true,
"_type": 0,
...
...
@@ -9035,7 +8879,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
8
"__id__": 19
4
},
"_enabled": true,
"tag": 0,
...
...
@@ -9078,17 +8922,17 @@
"_name": "Tutorial Tap copy",
"_objFlags": 0,
"_parent": {
"__id__": 1
41
"__id__": 1
37
},
"_children": [
{
"__id__": 20
5
"__id__": 20
1
}
],
"_active": true,
"_components": [
{
"__id__": 20
7
"__id__": 20
3
}
],
"_prefab": null,
...
...
@@ -9144,13 +8988,13 @@
"_name": "hand",
"_objFlags": 0,
"_parent": {
"__id__": 20
4
"__id__": 20
0
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
6
"__id__": 20
2
}
],
"_prefab": null,
...
...
@@ -9206,7 +9050,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
5
"__id__": 20
1
},
"_enabled": true,
"_materials": [
...
...
@@ -9238,7 +9082,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
4
"__id__": 20
0
},
"_enabled": true,
"_id": "0fmaVPxutFp715PkTE0KGs"
...
...
@@ -9248,11 +9092,11 @@
"_name": "Hammer",
"_objFlags": 0,
"_parent": {
"__id__": 1
41
"__id__": 1
37
},
"_children": [
{
"__id__": 20
9
"__id__": 20
5
}
],
"_active": true,
...
...
@@ -9310,13 +9154,13 @@
"_name": "Bua",
"_objFlags": 0,
"_parent": {
"__id__": 20
8
"__id__": 20
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
10
"__id__": 2
06
}
],
"_prefab": null,
...
...
@@ -9372,7 +9216,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
9
"__id__": 20
5
},
"_enabled": true,
"_materials": [
...
...
@@ -9414,11 +9258,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
41
"__id__": 1
37
},
"_enabled": true,
"hammerNode": {
"__id__": 20
8
"__id__": 20
4
},
"_id": "bajJhmrelJN6Gv2WqcoCLj"
},
...
...
@@ -9433,10 +9277,10 @@
"_active": true,
"_components": [
{
"__id__": 2
13
"__id__": 2
09
},
{
"__id__": 21
4
"__id__": 21
0
}
],
"_prefab": null,
...
...
@@ -9492,7 +9336,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
12
"__id__": 2
08
},
"_enabled": true,
"_type": 1,
...
...
@@ -9517,7 +9361,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
12
"__id__": 2
08
},
"_enabled": true,
"tag": 0,
...
...
@@ -9538,6 +9382,176 @@
},
"_id": "b8Mk8Eu8dBG4ECrSWuKcF2"
},
{
"__type__": "cc.Node",
"_name": "Tutorial Tap copy",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [
{
"__id__": 212
}
],
"_active": true,
"_components": [
{
"__id__": 214
}
],
"_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": [
-400,
-400,
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": "96h6U6dtZD6Lsp+t7kpiU5"
},
{
"__type__": "cc.Node",
"_name": "hand",
"_objFlags": 0,
"_parent": {
"__id__": 211
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 213
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 215,
"height": 291
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_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": "5aRNyVMmZLl6mrjVAYwBpb"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 212
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "bb4b8653-efdf-49ce-b06e-3e199eddbc6f"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "fe72MFyJ5O4o2xsl7iZ9iF"
},
{
"__type__": "2c2cbdHwQFCdpQMA/zXzBGt",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 211
},
"_enabled": true,
"_id": "18syyvxH5BArzqvql50K+S"
},
{
"__type__": "90267gmddZPkLBW/eIiYJR6",
"_name": "",
...
...
assets/scripts/Events.ts
View file @
b13dc8a7
...
...
@@ -26,6 +26,7 @@ export const CHECK_FRAGMENT = 'CHECK_FRAGMENT';
export
const
HAMMER
=
'HAMMER'
;
export
const
RESET_BOTTLE
=
'RESET_BOTTLE'
;
export
const
RESET_FRAGMENT
=
'RESET_FRAGMENT'
;
export
const
DROP_FRAGMENT
=
'DROP_FRAGMENT'
;
export
const
DROP_ALL_FRAGMENT
=
'DROP_ALL_FRAGMENT'
;
export
const
DROP_TOP_FRAGMENT
=
'DROP_TOP_FRAGMENT'
;
export
const
DROP_BEHIND_FRAGMENT
=
'DROP_BEHIND_FRAGMENT'
;
export
const
SHAKE_FRAGMENT
=
'SHAKE_FRAGMENT'
;
\ No newline at end of file
assets/scripts/GamePlay/BehindFragment.ts
View file @
b13dc8a7
import
{
eventTarget
,
RESET_FRAGMENT
}
from
"../Events"
;
import
{
eventTarget
,
RESET_FRAGMENT
,
SHAKE_FRAGMENT
}
from
"../Events"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
...
@@ -7,6 +7,7 @@ const { ccclass, property } = cc._decorator;
export
default
class
BehindFragment
extends
cc
.
Component
{
private
_rg
:
cc
.
RigidBody
=
null
;
private
_physicsCollider
:
cc
.
PhysicsCollider
=
null
;
private
_isDropped
:
boolean
=
false
;
onLoad
()
{
this
.
_rg
=
this
.
node
.
getComponent
(
cc
.
RigidBody
);
...
...
@@ -15,9 +16,22 @@ export default class BehindFragment extends cc.Component {
this
.
_physicsCollider
.
enabled
=
false
;
eventTarget
.
on
(
RESET_FRAGMENT
,
this
.
reset
,
this
);
eventTarget
.
on
(
SHAKE_FRAGMENT
,
this
.
shakeFragment
,
this
);
}
public
shakeFragment
()
{
if
(
this
.
_isDropped
)
{
return
;
}
cc
.
tween
(
this
.
node
)
.
repeat
(
2
,
cc
.
tween
(
this
.
node
)
.
by
(
0.05
,
{
position
:
cc
.
v3
(
-
10
,
-
10
)
})
.
by
(
0.05
,
{
position
:
cc
.
v3
(
10
,
10
)
})
)
.
start
();
}
public
onDrop
()
{
this
.
_isDropped
=
true
;
this
.
scheduleOnce
(()
=>
{
this
.
_rg
.
type
=
cc
.
RigidBodyType
.
Dynamic
;
this
.
_rg
.
gravityScale
=
10
;
...
...
assets/scripts/GamePlay/BreakingBottleController.ts
View file @
b13dc8a7
import
{
BEAT_GUILD
,
CHECK_FRAGMENT
,
CHECK_TOUCH
,
DROP_FRAGMENT
,
eventTarget
,
HAMMER
,
RESET_BOTTLE
,
RESET_FRAGMENT
,
SHOW_CARD_POPUP
,
STOP_GUILD_TAP
}
from
"../Events"
;
import
{
BEAT_GUILD
,
CHECK_FRAGMENT
,
CHECK_TOUCH
,
DROP_
ALL_
FRAGMENT
,
eventTarget
,
HAMMER
,
RESET_BOTTLE
,
RESET_FRAGMENT
,
SHOW_CARD_POPUP
,
STOP_GUILD_TAP
}
from
"../Events"
;
import
{
Global
}
from
"../Global"
;
import
FragmentController
from
"./FragmentController"
;
...
...
@@ -87,7 +87,7 @@ export default class BreakingBottleController extends cc.Component {
this
.
_isEnd
=
true
;
}
if
(
this
.
_bodyFragments
.
length
==
6
)
{
eventTarget
.
emit
(
DROP_FRAGMENT
);
eventTarget
.
emit
(
DROP_
ALL_
FRAGMENT
);
}
}
...
...
assets/scripts/GamePlay/BreakingJarController.ts
View file @
b13dc8a7
import
{
BEAT_GUILD
,
CHECK_FRAGMENT
,
CHECK_TOUCH
,
eventTarget
,
HAMMER
,
RESET_BOTTLE
,
RESET_FRAGMENT
,
SHAKE_FRAGMENT
,
SHOW_CARD_POPUP
,
STOP_GUILD_TAP
}
from
"../Events"
;
import
{
BEAT_GUILD
,
CHECK_FRAGMENT
,
CHECK_TOUCH
,
DROP_TOP_FRAGMENT
,
eventTarget
,
HAMMER
,
RESET_BOTTLE
,
RESET_FRAGMENT
,
SHAKE_FRAGMENT
,
SHOW_CARD_POPUP
,
STOP_GUILD_TAP
}
from
"../Events"
;
import
{
Global
}
from
"../Global"
;
import
BehindFragment
from
"./BehindFragment"
;
import
FragmentJarController
from
"./FragmentJarController"
;
...
...
@@ -7,7 +7,8 @@ const { ccclass, property } = cc._decorator;
@
ccclass
export
default
class
BreakingJarController
extends
cc
.
Component
{
@
property
([
cc
.
Node
])
private
fragmentSpecialNodes
:
cc
.
Node
[]
=
[];
@
property
(
cc
.
Node
)
private
hammerNode
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
...
...
@@ -18,7 +19,7 @@ export default class BreakingJarController extends cc.Component {
private
_countFragment
=
0
;
private
_fragmentsPosition
:
cc
.
Vec3
[]
=
[];
private
_f
ragmentsNode
:
cc
.
Node
[]
=
[];
private
_f
ontFragments
:
cc
.
Node
[]
=
[];
private
_bodyFragments
:
string
[]
=
[];
private
_isEnd
=
false
;
private
_behindJarChild
:
BehindFragment
[]
=
[];
...
...
@@ -41,8 +42,8 @@ export default class BreakingJarController extends cc.Component {
eventTarget
.
on
(
RESET_BOTTLE
,
this
.
resetBottle
,
this
);
eventTarget
.
on
(
BEAT_GUILD
,
this
.
beatGuild
,
this
);
this
.
_f
ragmentsNode
=
this
.
getComponentsInChildren
(
FragmentJarController
).
map
(
item
=>
item
.
node
);
this
.
_fragmentsPosition
=
this
.
_f
ragmentsNode
.
map
(
item
=>
item
.
position
.
clone
());
this
.
_f
ontFragments
=
this
.
getComponentsInChildren
(
FragmentJarController
).
map
(
item
=>
item
.
node
);
this
.
_fragmentsPosition
=
this
.
_f
ontFragments
.
map
(
item
=>
item
.
position
.
clone
());
this
.
_behindJarChild
=
this
.
behindJar
.
children
.
map
(
item
=>
item
.
getComponent
(
BehindFragment
));
this
.
_behindJarChildPosition
=
this
.
behindJar
.
children
.
map
(
item
=>
item
.
position
.
clone
());
}
...
...
@@ -60,7 +61,7 @@ export default class BreakingJarController extends cc.Component {
this
.
_bodyFragments
=
[];
this
.
_spine
.
setSkin
(
this
.
_skins
[
Global
.
tool
%
this
.
_skins
.
length
]);
this
.
_f
ragmentsNode
.
forEach
((
node
,
index
)
=>
{
this
.
_f
ontFragments
.
forEach
((
node
,
index
)
=>
{
node
.
position
=
this
.
_fragmentsPosition
[
index
];
})
...
...
@@ -89,7 +90,7 @@ export default class BreakingJarController extends cc.Component {
private
shakeNode
()
{
cc
.
director
.
getPhysicsManager
().
enabled
=
false
;
eventTarget
.
emit
(
SHAKE_FRAGMENT
)
eventTarget
.
emit
(
SHAKE_FRAGMENT
)
;
cc
.
tween
(
this
.
node
)
.
delay
(
0.15
)
.
call
(()
=>
cc
.
director
.
getPhysicsManager
().
enabled
=
true
)
...
...
@@ -97,8 +98,8 @@ export default class BreakingJarController extends cc.Component {
}
private
checkFragment
(
fragmentNode
:
cc
.
Node
)
{
const
f
ragmentIndex
=
this
.
_fragmentsNode
.
findIndex
(
item
=>
item
===
fragmentNode
);
const
behindFragment
=
this
.
_behindJarChild
[
f
ragmentIndex
];
const
f
ontFragment
=
this
.
_fontFragments
.
findIndex
(
item
=>
item
===
fragmentNode
);
const
behindFragment
=
this
.
_behindJarChild
[
f
ontFragment
];
behindFragment
.
onDrop
();
if
(
this
.
_isEnd
)
{
...
...
@@ -107,9 +108,20 @@ export default class BreakingJarController extends cc.Component {
this
.
_bodyFragments
.
push
(
fragmentNode
.
name
);
this
.
_countFragment
++
;
if
(
this
.
_countFragment
==
8
)
{
if
(
this
.
_countFragment
==
9
)
{
console
.
log
(
'this._countFragment'
,
this
.
_countFragment
)
this
.
scheduleOnce
(()
=>
eventTarget
.
emit
(
SHOW_CARD_POPUP
),
1.5
);
this
.
_isEnd
=
true
;
return
;
}
const
isSpecial
=
this
.
fragmentSpecialNodes
.
some
(
item
=>
item
===
fragmentNode
);
const
isDropTop
=
this
.
fragmentSpecialNodes
.
every
(
item
=>
item
.
getComponent
(
FragmentJarController
).
isDropped
);
if
(
isSpecial
&&
isDropTop
)
{
console
.
log
(
'this._countFragment'
,
this
.
_countFragment
)
eventTarget
.
emit
(
DROP_TOP_FRAGMENT
);
}
}
...
...
assets/scripts/GamePlay/FragmentController.ts
View file @
b13dc8a7
import
{
eventTarget
,
CHECK_TOUCH
,
CHECK_FRAGMENT
,
HAMMER
,
RESET_FRAGMENT
,
PLAY_DROP_SOUND
,
DROP_FRAGMENT
}
from
"../Events"
;
import
{
eventTarget
,
CHECK_TOUCH
,
CHECK_FRAGMENT
,
HAMMER
,
RESET_FRAGMENT
,
PLAY_DROP_SOUND
,
DROP_
ALL_
FRAGMENT
}
from
"../Events"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
...
@@ -22,7 +22,7 @@ export default class FragmentController extends cc.Component {
eventTarget
.
on
(
CHECK_TOUCH
,
this
.
checkTouch
,
this
);
eventTarget
.
on
(
RESET_FRAGMENT
,
this
.
reset
,
this
);
eventTarget
.
on
(
DROP_FRAGMENT
,
()
=>
this
.
node
.
name
.
includes
(
'nap'
)
&&
this
.
dropFragment
(),
this
);
eventTarget
.
on
(
DROP_
ALL_
FRAGMENT
,
()
=>
this
.
node
.
name
.
includes
(
'nap'
)
&&
this
.
dropFragment
(),
this
);
}
public
reset
()
{
...
...
assets/scripts/GamePlay/FragmentJarController.ts
View file @
b13dc8a7
import
{
CHECK_FRAGMENT
,
CHECK_TOUCH
,
DROP_FRAGMENT
,
eventTarget
,
HAMMER
,
PLAY_DROP_SOUND
,
RESET_FRAGMENT
,
SHAKE_FRAGMENT
}
from
"../Events"
;
import
{
CHECK_FRAGMENT
,
CHECK_TOUCH
,
DROP_
ALL_FRAGMENT
,
DROP_TOP_
FRAGMENT
,
eventTarget
,
HAMMER
,
PLAY_DROP_SOUND
,
RESET_FRAGMENT
,
SHAKE_FRAGMENT
}
from
"../Events"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
...
@@ -9,14 +9,15 @@ export default class FragmentJarController extends cc.Component {
@
property
private
isBottom
:
boolean
=
false
;
public
isDropped
:
boolean
=
false
;
private
_physicsCollider
:
cc
.
PhysicsPolygonCollider
=
null
;
private
_physicsColliderFragmentLink
:
cc
.
PhysicsPolygonCollider
=
null
;
private
_rg
:
cc
.
RigidBody
=
null
;
private
_siblingIndex
:
number
=
0
;
private
_isDropped
:
boolean
=
false
;
private
_numberOfBeats
=
3
;
private
_slots
:
cc
.
Node
[]
=
[];
onLoad
()
{
this
.
_physicsCollider
=
this
.
node
.
getComponent
(
cc
.
PhysicsPolygonCollider
);
this
.
_physicsColliderFragmentLink
=
this
.
fragmentLink
&&
this
.
fragmentLink
.
getComponent
(
cc
.
PhysicsPolygonCollider
);
...
...
@@ -29,7 +30,8 @@ export default class FragmentJarController extends cc.Component {
eventTarget
.
on
(
CHECK_TOUCH
,
this
.
checkTouch
,
this
);
eventTarget
.
on
(
RESET_FRAGMENT
,
this
.
reset
,
this
);
eventTarget
.
on
(
DROP_FRAGMENT
,
()
=>
this
.
node
.
name
.
includes
(
'nap'
)
&&
this
.
dropFragment
(),
this
);
eventTarget
.
on
(
DROP_ALL_FRAGMENT
,
this
.
dropFragment
,
this
);
eventTarget
.
on
(
DROP_TOP_FRAGMENT
,
this
.
dropFragmentTop
,
this
);
eventTarget
.
on
(
SHAKE_FRAGMENT
,
this
.
shakeFragment
,
this
);
}
...
...
@@ -38,15 +40,16 @@ export default class FragmentJarController extends cc.Component {
this
.
_rg
.
type
=
cc
.
RigidBodyType
.
Static
;
this
.
node
.
angle
=
0
;
this
.
node
.
setSiblingIndex
(
this
.
_siblingIndex
);
this
.
_
isDropped
=
false
;
this
.
isDropped
=
false
;
this
.
_numberOfBeats
=
3
;
this
.
node
.
children
.
forEach
(
slot
=>
slot
.
active
=
false
);
}
public
shakeFragment
()
{
if
(
this
.
_
isDropped
)
{
if
(
this
.
isDropped
)
{
return
;
}
cc
.
tween
(
this
.
node
)
.
repeat
(
2
,
cc
.
tween
(
this
.
node
)
.
by
(
0.05
,
{
position
:
cc
.
v3
(
-
10
,
-
10
)
})
...
...
@@ -56,7 +59,7 @@ export default class FragmentJarController extends cc.Component {
}
private
checkTouch
(
point
:
cc
.
Vec2
)
{
if
(
this
.
_isDropped
||
this
.
isBottom
)
{
if
(
this
.
isDropped
)
{
return
;
}
const
pos
=
point
.
clone
().
subtract
(
cc
.
v2
(
this
.
node
.
position
.
x
,
this
.
node
.
position
.
y
));
...
...
@@ -84,13 +87,31 @@ export default class FragmentJarController extends cc.Component {
}
eventTarget
.
emit
(
HAMMER
,
point
);
if
(
this
.
_numberOfBeats
<=
0
)
{
this
.
dropFragment
();
if
(
this
.
_numberOfBeats
>
0
)
{
return
;
}
if
(
this
.
isBottom
)
{
eventTarget
.
emit
(
DROP_ALL_FRAGMENT
)
return
;
}
this
.
dropFragment
();
}
private
dropFragmentTop
()
{
if
(
this
.
isBottom
)
{
return
;
}
this
.
dropFragment
();
}
private
dropFragment
()
{
this
.
_isDropped
=
true
;
if
(
this
.
isDropped
)
{
return
;
}
this
.
isDropped
=
true
;
const
pos
=
this
.
node
.
position
;
eventTarget
.
emit
(
CHECK_FRAGMENT
,
this
.
node
);
...
...
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