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
6afb5718
Commit
6afb5718
authored
Apr 01, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add collider to Fragment
parent
0c905f64
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1352 additions
and
60 deletions
+1352
-60
main.fire
assets/main.fire
+1235
-59
Events.ts
assets/scripts/Events.ts
+3
-1
BreakingBottleController.ts
assets/scripts/GamePlay/BreakingBottleController.ts
+31
-0
BreakingBottleController.ts.meta
assets/scripts/GamePlay/BreakingBottleController.ts.meta
+10
-0
FragmentController.ts
assets/scripts/GamePlay/FragmentController.ts
+28
-0
FragmentController.ts.meta
assets/scripts/GamePlay/FragmentController.ts.meta
+10
-0
BreakingBottleScreen.ts
assets/scripts/UI/BreakingBottleScreen.ts
+25
-0
BreakingBottleScreen.ts.meta
assets/scripts/UI/BreakingBottleScreen.ts.meta
+10
-0
No files found.
assets/main.fire
View file @
6afb5718
...
...
@@ -99,10 +99,10 @@
"_active": true,
"_components": [
{
"__id__": 1
33
"__id__": 1
54
},
{
"__id__": 1
34
"__id__": 1
55
}
],
"_prefab": null,
...
...
@@ -5132,12 +5132,18 @@
},
{
"__id__": 113
},
{
"__id__": 115
},
{
"__id__": 151
}
],
"_active": true,
"_components": [
{
"__id__": 1
32
"__id__": 1
53
}
],
"_prefab": null,
...
...
@@ -5190,7 +5196,7 @@
},
{
"__type__": "cc.Node",
"_name": "
Layer 723
",
"_name": "
BG
",
"_objFlags": 0,
"_parent": {
"__id__": 110
...
...
@@ -5211,6 +5217,100 @@
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1769,
"height": 1943
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
344.799,
-10.664,
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": "bbMXyTaIlAKKtziI2OKqAC"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "226e070a-e396-4c42-98b4-ad57de979ce7"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "47ic8aEEVLRYdN6TmG8LeR"
},
{
"__type__": "cc.Node",
"_name": "Layer 723",
"_objFlags": 0,
"_parent": {
"__id__": 110
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 114
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 326,
...
...
@@ -5255,7 +5355,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
1
"__id__": 11
3
},
"_enabled": true,
"_materials": [
...
...
@@ -5291,14 +5391,18 @@
},
"_children": [
{
"__id__": 11
4
"__id__": 11
6
},
{
"__id__": 1
27
"__id__": 1
41
}
],
"_active": true,
"_components": [],
"_components": [
{
"__id__": 150
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
...
...
@@ -5329,8 +5433,8 @@
0,
0,
1,
0.9
,
0.9
,
1
,
1
,
1
]
},
...
...
@@ -5352,26 +5456,26 @@
"_name": "Body",
"_objFlags": 0,
"_parent": {
"__id__": 11
3
"__id__": 11
5
},
"_children": [
{
"__id__": 11
5
"__id__": 11
7
},
{
"__id__": 1
17
"__id__": 1
21
},
{
"__id__": 1
19
"__id__": 1
25
},
{
"__id__": 12
1
"__id__": 12
9
},
{
"__id__": 1
2
3
"__id__": 1
3
3
},
{
"__id__": 1
25
"__id__": 1
37
}
],
"_active": true,
...
...
@@ -5429,13 +5533,19 @@
"_name": "6",
"_objFlags": 0,
"_parent": {
"__id__": 11
4
"__id__": 11
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 116
"__id__": 118
},
{
"__id__": 119
},
{
"__id__": 120
}
],
"_prefab": null,
...
...
@@ -5486,12 +5596,22 @@
"groupIndex": 0,
"_id": "e2oYTJZgNMmLJdOYj0cb+n"
},
{
"__type__": "ad9b7GDeB1K5qyTea3TjVfH",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 117
},
"_enabled": true,
"_id": "cfh1jBullN7JO53xK2NK9d"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
5
"__id__": 11
7
},
"_enabled": true,
"_materials": [
...
...
@@ -5518,18 +5638,92 @@
"_atlas": null,
"_id": "eaXqi7yRFKI7lsR2mt5DdT"
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 117
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": 36.9,
"y": -105.7
},
{
"__type__": "cc.Vec2",
"x": 39.8,
"y": -21
},
{
"__type__": "cc.Vec2",
"x": 44.5,
"y": -9.6
},
{
"__type__": "cc.Vec2",
"x": -35.7,
"y": -10
},
{
"__type__": "cc.Vec2",
"x": -94.9,
"y": 74.5
},
{
"__type__": "cc.Vec2",
"x": -114.9,
"y": 27.7
},
{
"__type__": "cc.Vec2",
"x": -119.9,
"y": 5.2
},
{
"__type__": "cc.Vec2",
"x": -116,
"y": -17.9
},
{
"__type__": "cc.Vec2",
"x": -88.9,
"y": -79.8
},
{
"__type__": "cc.Vec2",
"x": -32.2,
"y": -157.9
}
],
"_id": "6f0VIVDhBLPqmSJl7BabDB"
},
{
"__type__": "cc.Node",
"_name": "3",
"_objFlags": 0,
"_parent": {
"__id__": 11
4
"__id__": 11
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 118
"__id__": 122
},
{
"__id__": 123
},
{
"__id__": 124
}
],
"_prefab": null,
...
...
@@ -5585,7 +5779,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
17
"__id__": 1
21
},
"_enabled": true,
"_materials": [
...
...
@@ -5613,111 +5807,131 @@
"_id": "6cic2IPIVK/5EqOZvcBblp"
},
{
"__type__": "
cc.Node
",
"_name": "
2
",
"__type__": "
ad9b7GDeB1K5qyTea3TjVfH
",
"_name": "",
"_objFlags": 0,
"_parent": {
"__id__": 114
"node": {
"__id__": 121
},
"_enabled": true,
"_id": "4f6Dt6/09FwL+yIiIkzOdP"
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 120
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 121
},
"_contentSize": {
"__type__": "cc.Size",
"width": 346,
"height": 307
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_anchorPoint": {
"points": [
{
"__type__": "cc.Vec2",
"x": 0.5
,
"y": 0.5
"x": -54.4
,
"y": -19.2
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
149.797,
138.016,
0,
0,
0,
0,
1,
1,
1,
1
]
{
"__type__": "cc.Vec2",
"x": 17.2,
"y": -46.8
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
{
"__type__": "cc.Vec2",
"x": 57.7,
"y": -109.6
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "dfzKgCHpJAhrHYjPbf3ZhS"
{
"__type__": "cc.Vec2",
"x": 106.3,
"y": -121.9
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
"__type__": "cc.Vec2",
"x": 139.2,
"y": -64.2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "42992026-920e-4847-b25e-6757f77088d6"
"__type__": "cc.Vec2",
"x": 154.8,
"y": -24.2
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
{
"__type__": "cc.Vec2",
"x": 0
,
"y": 0
"x": 156.6
,
"y": -5.1
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6c0FeNhfFC7Lj7bsetzDOV"
{
"__type__": "cc.Vec2",
"x": 153.8,
"y": 13
},
{
"__type__": "cc.Vec2",
"x": 139.9,
"y": 49.2
},
{
"__type__": "cc.Vec2",
"x": 118.2,
"y": 86.9
},
{
"__type__": "cc.Vec2",
"x": 106.1,
"y": 28.3
},
{
"__type__": "cc.Vec2",
"x": 29.2,
"y": -12.1
},
{
"__type__": "cc.Vec2",
"x": -0.7,
"y": 21.6
},
{
"__type__": "cc.Vec2",
"x": -33.5,
"y": 23
},
{
"__type__": "cc.Vec2",
"x": -41.3,
"y": 29
},
{
"__type__": "cc.Vec2",
"x": -70.9,
"y": 22.2
}
],
"_id": "48m94JTnZJF49No8VUxTS4"
},
{
"__type__": "cc.Node",
"_name": "
4
",
"_name": "
2
",
"_objFlags": 0,
"_parent": {
"__id__": 11
4
"__id__": 11
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 122
"__id__": 126
},
{
"__id__": 127
},
{
"__id__": 128
}
],
"_prefab": null,
...
...
@@ -5731,8 +5945,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 3
85
,
"height":
440
"width": 3
46
,
"height":
307
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -5743,8 +5957,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1
12.525
,
-81.688
,
1
49.797
,
138.016
,
0,
0,
0,
...
...
@@ -5766,14 +5980,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
bdKj6lVl5EbKvEE62y+d17
"
"_id": "
dfzKgCHpJAhrHYjPbf3ZhS
"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
1
"__id__": 12
5
},
"_enabled": true,
"_materials": [
...
...
@@ -5784,7 +5998,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "
7af07f93-553d-46e6-827a-568d738fe984
"
"__uuid__": "
42992026-920e-4847-b25e-6757f77088d6
"
},
"_type": 0,
"_sizeMode": 1,
...
...
@@ -5798,20 +6012,139 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "4fVjLpqOJEaIrhIyPlnBZA"
"_id": "6c0FeNhfFC7Lj7bsetzDOV"
},
{
"__type__": "ad9b7GDeB1K5qyTea3TjVfH",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 125
},
"_enabled": true,
"_id": "63ZB/kFSVEKavLaqo0Hp3l"
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 125
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -132.6,
"y": 2.7
},
{
"__type__": "cc.Vec2",
"x": -63.2,
"y": -114.3
},
{
"__type__": "cc.Vec2",
"x": -47.6,
"y": -111.1
},
{
"__type__": "cc.Vec2",
"x": -30.7,
"y": -119.4
},
{
"__type__": "cc.Vec2",
"x": 5.6,
"y": -113
},
{
"__type__": "cc.Vec2",
"x": 13,
"y": -117.5
},
{
"__type__": "cc.Vec2",
"x": 45.4,
"y": -120.3
},
{
"__type__": "cc.Vec2",
"x": 75.9,
"y": -152.9
},
{
"__type__": "cc.Vec2",
"x": 154.3,
"y": -112.3
},
{
"__type__": "cc.Vec2",
"x": 165.6,
"y": -53.6
},
{
"__type__": "cc.Vec2",
"x": 74.5,
"y": 58.2
},
{
"__type__": "cc.Vec2",
"x": 101.7,
"y": 106.5
},
{
"__type__": "cc.Vec2",
"x": 83.2,
"y": 94
},
{
"__type__": "cc.Vec2",
"x": 29.8,
"y": 80.3
},
{
"__type__": "cc.Vec2",
"x": -45.8,
"y": 71.4
},
{
"__type__": "cc.Vec2",
"x": -136.4,
"y": 67.3
},
{
"__type__": "cc.Vec2",
"x": -126.2,
"y": 53.7
}
],
"_id": "e7WUlmxT9KzJisRzEoQeZB"
},
{
"__type__": "cc.Node",
"_name": "
1
",
"_name": "
4
",
"_objFlags": 0,
"_parent": {
"__id__": 11
4
"__id__": 11
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 124
"__id__": 130
},
{
"__id__": 131
},
{
"__id__": 132
}
],
"_prefab": null,
...
...
@@ -5825,8 +6158,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
490
,
"height":
50
0
"width":
385
,
"height":
44
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -5837,8 +6170,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-88.801
,
41.803
,
112.525
,
-81.688
,
0,
0,
0,
...
...
@@ -5860,52 +6193,945 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "13qdJbmLpG7qWOaqDaXAjF"
"_id": "bdKj6lVl5EbKvEE62y+d17"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7af07f93-553d-46e6-827a-568d738fe984"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "4fVjLpqOJEaIrhIyPlnBZA"
},
{
"__type__": "ad9b7GDeB1K5qyTea3TjVfH",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
},
"_enabled": true,
"_id": "21oKTWFXpPAbnbcJMb9BD0"
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -100.2,
"y": -2.7
},
{
"__type__": "cc.Vec2",
"x": -100.2,
"y": -123.4
},
{
"__type__": "cc.Vec2",
"x": -37.6,
"y": -219.7
},
{
"__type__": "cc.Vec2",
"x": 53.8,
"y": -203
},
{
"__type__": "cc.Vec2",
"x": 100.4,
"y": -183.4
},
{
"__type__": "cc.Vec2",
"x": 120.1,
"y": -163.7
},
{
"__type__": "cc.Vec2",
"x": 122.1,
"y": -147.5
},
{
"__type__": "cc.Vec2",
"x": 114.5,
"y": -133.6
},
{
"__type__": "cc.Vec2",
"x": 149.4,
"y": -79.1
},
{
"__type__": "cc.Vec2",
"x": 159,
"y": -81.9
},
{
"__type__": "cc.Vec2",
"x": 190.7,
"y": -38.6
},
{
"__type__": "cc.Vec2",
"x": 143.1,
"y": -24.5
},
{
"__type__": "cc.Vec2",
"x": 105,
"y": 33
},
{
"__type__": "cc.Vec2",
"x": 31.6,
"y": 62
},
{
"__type__": "cc.Vec2",
"x": 13.6,
"y": 104
},
{
"__type__": "cc.Vec2",
"x": 8.7,
"y": 103.5
},
{
"__type__": "cc.Vec2",
"x": -8.4,
"y": 110.3
},
{
"__type__": "cc.Vec2",
"x": -24.9,
"y": 107.9
},
{
"__type__": "cc.Vec2",
"x": -85.1,
"y": 208.5
},
{
"__type__": "cc.Vec2",
"x": -141.6,
"y": 167.8
},
{
"__type__": "cc.Vec2",
"x": -176,
"y": 74.5
}
],
"_id": "38U9N/iIdDjZC1BSqUyuOR"
},
{
"__type__": "cc.Node",
"_name": "1",
"_objFlags": 0,
"_parent": {
"__id__": 116
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 134
},
{
"__id__": 135
},
{
"__id__": 136
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 490,
"height": 500
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-88.801,
41.803,
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": "13qdJbmLpG7qWOaqDaXAjF"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 133
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a51dbc0f-4f87-43bf-a574-45de8d3d9fa6"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "ca5uEkNDRAN6xM8HfG0s7D"
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 133
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -175.1,
"y": -65.9
},
{
"__type__": "cc.Vec2",
"x": -49.9,
"y": -69.1
},
{
"__type__": "cc.Vec2",
"x": -12.8,
"y": -81.5
},
{
"__type__": "cc.Vec2",
"x": 23,
"y": -64.7
},
{
"__type__": "cc.Vec2",
"x": 63.2,
"y": 44.1
},
{
"__type__": "cc.Vec2",
"x": 117.3,
"y": 82.7
},
{
"__type__": "cc.Vec2",
"x": 107.5,
"y": 99.8
},
{
"__type__": "cc.Vec2",
"x": 114.7,
"y": 151
},
{
"__type__": "cc.Vec2",
"x": 103,
"y": 164
},
{
"__type__": "cc.Vec2",
"x": -42.7,
"y": 170.6
},
{
"__type__": "cc.Vec2",
"x": -110.3,
"y": 181.6
},
{
"__type__": "cc.Vec2",
"x": -139.8,
"y": 191.6
},
{
"__type__": "cc.Vec2",
"x": -155.6,
"y": 204.2
},
{
"__type__": "cc.Vec2",
"x": -128.4,
"y": 152.2
},
{
"__type__": "cc.Vec2",
"x": -168.3,
"y": 108.5
},
{
"__type__": "cc.Vec2",
"x": -209.3,
"y": 58.8
},
{
"__type__": "cc.Vec2",
"x": -233.8,
"y": 20.2
}
],
"_id": "14tCZCcTVIg4ptMCVg2JUN"
},
{
"__type__": "ad9b7GDeB1K5qyTea3TjVfH",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 133
},
"_enabled": true,
"_id": "bcmluUpTRPK6hZlUXAbqw5"
},
{
"__type__": "cc.Node",
"_name": "5",
"_objFlags": 0,
"_parent": {
"__id__": 116
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 138
},
{
"__id__": 139
},
{
"__id__": 140
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 455,
"height": 448
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-37.657,
-78.815,
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": "9atAo6pftC7KWhWd1ZsHyx"
},
{
"__type__": "ad9b7GDeB1K5qyTea3TjVfH",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
},
"_enabled": true,
"_id": "68uH5Wy0NHeJJxTq87yA/F"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "81054583-f5ec-4194-abe0-62433ecad804"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "adqDX4XzVMe6YXoUZnB6cf"
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -180.9,
"y": -136.6
},
{
"__type__": "cc.Vec2",
"x": -187.8,
"y": -150.6
},
{
"__type__": "cc.Vec2",
"x": -186.3,
"y": -165.3
},
{
"__type__": "cc.Vec2",
"x": -169.7,
"y": -182.7
},
{
"__type__": "cc.Vec2",
"x": -132,
"y": -200.2
},
{
"__type__": "cc.Vec2",
"x": -79,
"y": -214.1
},
{
"__type__": "cc.Vec2",
"x": 2.3,
"y": -223.3
},
{
"__type__": "cc.Vec2",
"x": 62.9,
"y": -224.6
},
{
"__type__": "cc.Vec2",
"x": 117.1,
"y": -220.9
},
{
"__type__": "cc.Vec2",
"x": 51.4,
"y": -123.4
},
{
"__type__": "cc.Vec2",
"x": 52.3,
"y": -2.8
},
{
"__type__": "cc.Vec2",
"x": -25.2,
"y": 74.7
},
{
"__type__": "cc.Vec2",
"x": -32.4,
"y": 58.3
},
{
"__type__": "cc.Vec2",
"x": -61.2,
"y": 43.1
},
{
"__type__": "cc.Vec2",
"x": -102.5,
"y": 55.1
},
{
"__type__": "cc.Vec2",
"x": -149.5,
"y": 57.7
},
{
"__type__": "cc.Vec2",
"x": -156.3,
"y": -35.2
},
{
"__type__": "cc.Vec2",
"x": -216.1,
"y": -83.9
}
],
"_id": "57w0vFMsFD4J0JpX3pJOXf"
},
{
"__type__": "cc.Node",
"_name": "Nap",
"_objFlags": 0,
"_parent": {
"__id__": 115
},
"_children": [
{
"__id__": 142
},
{
"__id__": 146
}
],
"_active": true,
"_components": [],
"_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": "31Y7N2OVpAmbx/A3/MtJ1E"
},
{
"__type__": "cc.Node",
"_name": "nap 2",
"_objFlags": 0,
"_parent": {
"__id__": 141
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 143
},
{
"__id__": 144
},
{
"__id__": 145
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 379,
"height": 138
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-56.347,
275.598,
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": "716LttMPpH279LMXAAWc8M"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 142
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "112ec4be-e3db-4eb7-a9f5-38995bb5b9dd"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "eaa0YSsU9FEq/2r9QUW0Fe"
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 142
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": 7.2,
"y": -67.2
},
{
"__type__": "cc.Vec2",
"x": 109,
"y": -66.9
},
{
"__type__": "cc.Vec2",
"x": 118.8,
"y": -35.2
},
{
"__type__": "cc.Vec2",
"x": 89.6,
"y": -32.9
},
{
"__type__": "cc.Vec2",
"x": 73.6,
"y": -16.9
},
{
"__type__": "cc.Vec2",
"x": 132.1,
"y": 28.4
},
{
"__type__": "cc.Vec2",
"x": 161.2,
"y": 42.9
},
{
"__type__": "cc.Vec2",
"x": 136,
"y": 45.7
},
{
"__type__": "cc.Vec2",
"x": 115.8,
"y": 47.6
},
{
"__type__": "cc.Vec2",
"x": 106.5,
"y": 58.1
},
{
"__type__": "cc.Vec2",
"x": 89.3,
"y": 64.1
},
{
"__type__": "cc.Vec2",
"x": 64.4,
"y": 68.6
},
{
"__type__": "cc.Vec2",
"x": 42,
"y": 66.4
},
{
"__type__": "cc.Vec2",
"x": 24.4,
"y": 62.9
},
{
"__type__": "cc.Vec2",
"x": 14.2,
"y": 57.5
},
{
"__type__": "cc.Vec2",
"x": 4.4,
"y": 46.9
},
{
"__type__": "cc.Vec2",
"x": -27.8,
"y": 45
},
{
"__type__": "cc.Vec2",
"x": -75.4,
"y": 36.5
},
{
"__type__": "cc.Vec2",
"x": -118.1,
"y": 22.5
},
{
"__type__": "cc.Vec2",
"x": -149.6,
"y": 7.4
},
{
"__type__": "cc.Vec2",
"x": -183.6,
"y": -13.9
},
{
"__type__": "cc.Vec2",
"x": -188.4,
"y": -22.6
},
{
"__type__": "cc.Vec2",
"x": -188.4,
"y": -28.2
},
{
"__type__": "cc.Vec2",
"x": -179.8,
"y": -36.6
},
{
"__type__": "cc.Vec2",
"x": -159.8,
"y": -45.6
},
{
"__type__": "cc.Vec2",
"x": -105.6,
"y": -57.5
}
],
"_id": "12cpngVitHUJQRiDkBfyLq"
},
{
"__type__": "
cc.Sprite
",
"__type__": "
ad9b7GDeB1K5qyTea3TjVfH
",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
23
"__id__": 1
42
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a51dbc0f-4f87-43bf-a574-45de8d3d9fa6"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "ca5uEkNDRAN6xM8HfG0s7D"
"_id": "66j+VkXfpNoadfW56880/G"
},
{
"__type__": "cc.Node",
"_name": "
5
",
"_name": "
nap 1
",
"_objFlags": 0,
"_parent": {
"__id__": 1
14
"__id__": 1
41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 126
"__id__": 147
},
{
"__id__": 148
},
{
"__id__": 149
}
],
"_prefab": null,
...
...
@@ -5919,8 +7145,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
455
,
"height":
448
"width":
236
,
"height":
112
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -5931,8 +7157,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-37.657
,
-78.815
,
133.38
,
263.479
,
0,
0,
0,
...
...
@@ -5954,14 +7180,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
9atAo6pftC7KWhWd1ZsHyx
"
"_id": "
06eER1caxC9ZE3e1NmhIKa
"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
25
"__id__": 1
46
},
"_enabled": true,
"_materials": [
...
...
@@ -5972,7 +7198,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "
81054583-f5ec-4194-abe0-62433ecad804
"
"__uuid__": "
3d9a857a-019a-4d8a-a5ca-957e5d2b518b
"
},
"_type": 0,
"_sizeMode": 1,
...
...
@@ -5986,179 +7212,148 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
adqDX4XzVMe6YXoUZnB6cf
"
"_id": "
c4kVDVd3dJuKJOqW7Qt72s
"
},
{
"__type__": "
cc.Node
",
"_name": "
Nap
",
"__type__": "
ad9b7GDeB1K5qyTea3TjVfH
",
"_name": "",
"_objFlags": 0,
"_parent": {
"__id__": 113
"node": {
"__id__": 146
},
"_enabled": true,
"_id": "24D4XJuZlE+q6fQu9Zy6vU"
},
"_children": [
{
"__id__": 128
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 146
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__id__": 130
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
"__type__": "cc.Vec2",
"x": 13.9,
"y": -48.6
},
"_contentSize":
{
"__type__": "cc.Size
",
"width": 0
,
"height": 0
{
"__type__": "cc.Vec2
",
"x": 71.4
,
"y": -38.6
},
"_anchorPoint":
{
{
"__type__": "cc.Vec2",
"x":
0.5,
"y": 0.5
"x": 10
0.5,
"y": -29.2
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
79.232,
232.252,
0,
0,
0,
0,
1,
1,
1,
1
]
{
"__type__": "cc.Vec2",
"x": 113.7,
"y": -20.9
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
{
"__type__": "cc.Vec2",
"x": 118.2,
"y": -14.3
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "31Y7N2OVpAmbx/A3/MtJ1E"
{
"__type__": "cc.Vec2",
"x": 115.8,
"y": -7.5
},
{
"__type__": "cc.Node",
"_name": "nap 2",
"_objFlags": 0,
"_parent": {
"__id__": 127
"__type__": "cc.Vec2",
"x": 107.5,
"y": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 129
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
"__type__": "cc.Vec2",
"x": 89.9,
"y": 12.1
},
"_contentSize":
{
"__type__": "cc.Size
",
"width": 379
,
"height": 138
{
"__type__": "cc.Vec2
",
"x": 45.8
,
"y": 34.2
},
"_anchorPoint":
{
{
"__type__": "cc.Vec2",
"x": 0.5
,
"y": 0.5
"x": 8.8
,
"y": 47.2
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-134.001,
42.637,
0,
0,
0,
0,
1,
1,
1,
1
]
{
"__type__": "cc.Vec2",
"x": -30.8,
"y": 54.5
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
{
"__type__": "cc.Vec2",
"x": -59.5,
"y": 40.2
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "716LttMPpH279LMXAAWc8M"
{
"__type__": "cc.Vec2",
"x": -117.1,
"y": -5
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 128
"__type__": "cc.Vec2",
"x": -101.7,
"y": -21.8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__type__": "cc.Vec2",
"x": -74.9,
"y": -24.4
},
{
"__type__": "cc.Vec2",
"x": -74,
"y": -28.9
},
{
"__type__": "cc.Vec2",
"x": -79,
"y": -42.7
},
{
"__type__": "cc.Vec2",
"x": -82.6,
"y": -54.5
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "112ec4be-e3db-4eb7-a9f5-38995bb5b9dd"
"_id": "6dEWSFV2lAjZRMc+hEi4Uv"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
{
"__type__": "6fcd79x0JdPZKDzUr010UMy",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 115
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "eaa0YSsU9FEq/2r9QUW0Fe"
"_enabled": true,
"_id": "25U1ge+O5DNb3crcOwx3Pu"
},
{
"__type__": "cc.Node",
"_name": "
nap 1
",
"_name": "
New Sprite
",
"_objFlags": 0,
"_parent": {
"__id__": 1
27
"__id__": 1
10
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
31
"__id__": 1
52
}
],
"_prefab": null,
...
...
@@ -6172,8 +7367,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2
36
,
"height":
112
"width": 2
0
,
"height":
20
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -6184,8 +7379,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
55.703
,
30.981
,
0
,
0
,
0,
0,
0,
...
...
@@ -6207,14 +7402,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
06eER1caxC9ZE3e1NmhIKa
"
"_id": "
e3jCDOU0VExKvoPYRYipk/
"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
30
"__id__": 1
51
},
"_enabled": true,
"_materials": [
...
...
@@ -6225,10 +7420,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "
3d9a857a-019a-4d8a-a5ca-957e5d2b518b
"
"__uuid__": "
e7aba14b-f956-4480-b254-8d57832e273f
"
},
"_type": 0,
"_sizeMode":
1
,
"_sizeMode":
0
,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
...
...
@@ -6239,39 +7434,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
c4kVDVd3dJuKJOqW7Qt72s
"
"_id": "
4aeKl+F5NDy4t+ofdhiju2
"
},
{
"__type__": "
cc.Sprite
",
"__type__": "
90267gmddZPkLBW/eIiYJR6
",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 110
},
"_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
"spriteNode": {
"__id__": 151
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "99UgJTbchKdoUvxBHsn4uw"
"_id": "4eyUw4PwxKSq63DGUgJory"
},
{
"__type__": "cc.Canvas",
...
...
assets/scripts/Events.ts
View file @
6afb5718
...
...
@@ -20,3 +20,5 @@ export const ROTATE_GUILD = 'ROTATE_GUILD';
export
const
BEAT_GUILD
=
'BEAT_GUILD'
;
export
const
STOP_GUILD_ROTATE
=
'STOP_GUILD_ROTATE'
;
export
const
STOP_GUILD_TAP
=
'STOP_GUILD_TAP'
;
export
const
CHECK_TOUCH
=
'CHECK_TOUCH'
;
\ No newline at end of file
assets/scripts/GamePlay/BreakingBottleController.ts
0 → 100644
View file @
6afb5718
import
FragmentController
from
"./FragmentController"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
default
class
BreakingBottleController
extends
cc
.
Component
{
private
_body
:
cc
.
Node
=
null
;
private
_lid
:
cc
.
Node
=
null
;
private
_fragmentsBody
:
cc
.
Node
[]
=
[];
private
_fragmentsLid
:
cc
.
Node
[]
=
[];
private
_fragmentsAll
:
cc
.
Node
[]
=
[];
protected
onLoad
():
void
{
[
this
.
_body
,
this
.
_lid
]
=
this
.
node
.
children
;
this
.
_fragmentsBody
=
this
.
_body
.
children
;
this
.
_fragmentsLid
=
this
.
_lid
.
children
;
this
.
_fragmentsAll
=
[...
this
.
_fragmentsBody
,
...
this
.
_fragmentsLid
];
// console.log('this._fragmentsAll', this._fragmentsAll.map(item => item.position.toString()));
// this._fragmentsAll.forEach(item => {
// item.addComponent(FragmentController);
// })
}
}
assets/scripts/GamePlay/BreakingBottleController.ts.meta
0 → 100644
View file @
6afb5718
{
"ver": "1.1.0",
"uuid": "6fcd7f71-d097-4f64-a0f3-52bd35d14332",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
assets/scripts/GamePlay/FragmentController.ts
0 → 100644
View file @
6afb5718
import
{
eventTarget
,
CHECK_TOUCH
}
from
"../Events"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
default
class
FragmentController
extends
cc
.
Component
{
private
_collider
:
cc
.
PolygonCollider
=
null
;
onLoad
()
{
this
.
_collider
=
this
.
node
.
getComponent
(
cc
.
PolygonCollider
);
console
.
log
(
'this._collider'
,
this
.
_collider
.
points
.
length
)
eventTarget
.
on
(
CHECK_TOUCH
,
this
.
checkTouch
,
this
);
}
private
checkTouch
(
point
:
cc
.
Vec2
)
{
// console.log('point', point.toString(), this.node.position.toString());
const
pos
=
point
.
clone
().
subtract
(
cc
.
v2
(
this
.
node
.
position
.
x
,
this
.
node
.
position
.
y
));
let
isInside
=
cc
.
Intersection
.
pointInPolygon
(
pos
,
this
.
_collider
.
points
);
// console.log('this._collider.points', this._collider.points.map(i => i.toString()));
if
(
isInside
)
{
console
.
log
(
'isInside'
,
isInside
,
pos
.
toString
(),
this
.
node
.
name
)
}
}
}
assets/scripts/GamePlay/FragmentController.ts.meta
0 → 100644
View file @
6afb5718
{
"ver": "1.1.0",
"uuid": "ad9b7183-781d-4ae6-ac93-79add38d57c7",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
assets/scripts/UI/BreakingBottleScreen.ts
0 → 100644
View file @
6afb5718
import
{
eventTarget
,
CHECK_TOUCH
}
from
"../Events"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
default
class
BreakingBottleScreen
extends
cc
.
Component
{
@
property
(
cc
.
Node
)
private
spriteNode
:
cc
.
Node
=
null
;
onLoad
()
{
this
.
node
.
position
=
cc
.
v3
(
0
,
0
);
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
}
private
onTouchStart
(
event
:
cc
.
Event
.
EventTouch
)
{
const
pos
=
event
.
getLocation
();
const
nodePos
=
this
.
node
.
convertToNodeSpaceAR
(
pos
);
this
.
spriteNode
.
position
=
cc
.
v3
(
nodePos
.
x
,
nodePos
.
y
);
eventTarget
.
emit
(
CHECK_TOUCH
,
nodePos
);
}
}
assets/scripts/UI/BreakingBottleScreen.ts.meta
0 → 100644
View file @
6afb5718
{
"ver": "1.1.0",
"uuid": "90267826-75d6-4f90-b056-fde22260947a",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"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