Commit 99f7e199 authored by Vũ Gia Vương's avatar Vũ Gia Vương

done

parent d2272422
......@@ -2444,22 +2444,22 @@
"__id__": 64
},
{
"__id__": 69
"__id__": 78
},
{
"__id__": 78
"__id__": 66
},
{
"__id__": 87
},
{
"__id__": 96
"__id__": 101
},
{
"__id__": 101
"__id__": 103
},
{
"__id__": 110
"__id__": 93
},
{
"__id__": 115
......@@ -2532,13 +2532,13 @@
"__id__": 65
},
{
"__id__": 66
"__id__": 75
},
{
"__id__": 67
"__id__": 76
},
{
"__id__": 68
"__id__": 77
}
],
"_prefab": null,
......@@ -2597,161 +2597,40 @@
"__id__": 64
},
"_enabled": true,
"_id": "10cc3OIWVDIYqIwOG7Rp4k"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "425a06b7-01b8-4866-a416-35dfcc13a2ee"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "aewoB1GZ1B9ZMOqjjEcRpM"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_type": 1,
"_allowSleep": true,
"_gravityScale": 1,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": false,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "8ahRt8QvFAT708XisBhQuJ"
},
{
"__type__": "cc.PhysicsPolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"fragmentLink": {
"__id__": 66
},
"points": [
{
"__type__": "cc.Vec2",
"x": -38,
"y": -60.2
},
{
"__type__": "cc.Vec2",
"x": -27.9,
"y": -24.3
},
{
"__type__": "cc.Vec2",
"x": 18.3,
"y": 20.4
},
{
"__type__": "cc.Vec2",
"x": 119.1,
"y": 5.7
},
{
"__type__": "cc.Vec2",
"x": 143,
"y": 60.2
},
{
"__type__": "cc.Vec2",
"x": 84.2,
"y": 124.7
},
{
"__type__": "cc.Vec2",
"x": -124.7,
"y": -0.7
},
{
"__type__": "cc.Vec2",
"x": -146.8,
"y": -90.5
},
{
"__type__": "cc.Vec2",
"x": -93.5,
"y": -104
}
],
"_id": "67LnPQQvBBr7bWfPiXPAUk"
"isBottom": false,
"_id": "10cc3OIWVDIYqIwOG7Rp4k"
},
{
"__type__": "cc.Node",
"_name": "jar-broke-final-2_0017_2",
"_name": "jar-broke-final-2_0016_3",
"_objFlags": 0,
"_parent": {
"__id__": 63
},
"_children": [
{
"__id__": 70
"__id__": 67
},
{
"__id__": 72
"__id__": 69
}
],
"_active": true,
"_components": [
{
"__id__": 74
"__id__": 71
},
{
"__id__": 75
"__id__": 72
},
{
"__id__": 76
"__id__": 73
},
{
"__id__": 77
"__id__": 74
}
],
"_prefab": null,
......@@ -2765,8 +2644,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 349,
"height": 221
"width": 339,
"height": 291
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2777,8 +2656,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
84.16,
233.719,
-168.789,
142.825,
0,
0,
0,
......@@ -2800,20 +2679,20 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a9JfLpV0dJbY6zy5gpBDGg"
"_id": "73+jEEFyJESZScFBVSf1DT"
},
{
"__type__": "cc.Node",
"_name": "top-right-1",
"_name": "top-left-1",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 66
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 71
"__id__": 68
}
],
"_prefab": null,
......@@ -2827,7 +2706,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 116,
"width": 180,
"height": 122
},
"_anchorPoint": {
......@@ -2839,8 +2718,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
37.126,
-37.68,
-19.401,
-12.19,
0,
0,
0,
......@@ -2862,14 +2741,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3djTLa4m1KAIx8yYzv2Kmj"
"_id": "e1baNwmR5Oe5bRuqcAWIrV"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 67
},
"_enabled": true,
"_materials": [
......@@ -2880,7 +2759,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ceecd93a-1811-4049-b91f-bb94c026c178"
"__uuid__": "39948bf7-7854-493b-8a4f-ab128b157537"
},
"_type": 0,
"_sizeMode": 1,
......@@ -2894,20 +2773,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "eckVDI1yNK4IELPWP0hRQe"
"_id": "06faKPWXZFvrcpJb+PsdCq"
},
{
"__type__": "cc.Node",
"_name": "top-right-2",
"_name": "top-left-2",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 66
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 73
"__id__": 70
}
],
"_prefab": null,
......@@ -2921,8 +2800,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 298,
"height": 155
"width": 268,
"height": 204
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2933,8 +2812,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
20.404,
-24.545,
25.141,
1.475,
0,
0,
0,
......@@ -2956,14 +2835,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "517nkLcu5LTqbVsI1lNo/1"
"_id": "fdBJ9FsAhDq4qt7qoS0fFu"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 69
},
"_enabled": true,
"_materials": [
......@@ -2974,7 +2853,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "2a472542-18a6-40c6-90b7-83065f0e0ba3"
"__uuid__": "4b3ce04f-1f95-46cf-811f-f1b871e050be"
},
"_type": 0,
"_sizeMode": 1,
......@@ -2988,24 +2867,28 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "2b6s2+B8VBxaNmK51pqRJp"
"_id": "81sKr2afJJbKuUv2aB4EOl"
},
{
"__type__": "6c740VuPjRONJYF5qy87yUs",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
"__id__": 66
},
"_enabled": true,
"_id": "baZJk47LtKZ4MjF7H+AxgZ"
"fragmentLink": {
"__id__": 64
},
"isBottom": false,
"_id": "0ejbJB9ipO9ZV718vF+OtA"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
"__id__": 66
},
"_enabled": true,
"_materials": [
......@@ -3016,7 +2899,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "1fa6c0dd-e896-436a-8186-ac0a802f0bb2"
"__uuid__": "d5ca449a-529a-4216-bb67-9a9f8034ff24"
},
"_type": 0,
"_sizeMode": 1,
......@@ -3030,14 +2913,14 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "66nrUuS5NMyYxsmUEkVatk"
"_id": "e0anJmem9C0Y+e3gOv/X8X"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
"__id__": 66
},
"_enabled": true,
"_type": 1,
......@@ -3055,14 +2938,14 @@
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "68xnfMZ3dO7IiGGZbhAsQm"
"_id": "12qLJLC/VLS5WGYZ7osWjt"
},
{
"__type__": "cc.PhysicsPolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
"__id__": 66
},
"_enabled": true,
"tag": 0,
......@@ -3079,65 +2962,210 @@
"points": [
{
"__type__": "cc.Vec2",
"x": -81.2,
"y": -32.5
"x": -38.4,
"y": -123.1
},
{
"__type__": "cc.Vec2",
"x": -20.9,
"y": -30.3
"x": -12.3,
"y": -73.5
},
{
"__type__": "cc.Vec2",
"x": 41.2,
"y": -97.2
"x": 78,
"y": -73.6
},
{
"__type__": "cc.Vec2",
"x": 149.8,
"y": -97
"x": 63.4,
"y": -7.9
},
{
"__type__": "cc.Vec2",
"x": 172.6,
"y": -67.6
"x": 155.1,
"y": 55.6
},
{
"__type__": "cc.Vec2",
"x": 106.1,
"y": 66.2
"x": 168.2,
"y": 75.7
},
{
"__type__": "cc.Vec2",
"x": -28.1,
"y": 108.9
"x": 158.9,
"y": 112.8
},
{
"__type__": "cc.Vec2",
"x": -48,
"y": 62.9
"x": 81.9,
"y": 144.8
},
{
"__type__": "cc.Vec2",
"x": -148.6,
"y": 78.4
"x": 60.7,
"y": 124.4
},
{
"__type__": "cc.Vec2",
"x": -173,
"y": 54.2
},
"x": 51.5,
"y": 87.9
},
{
"__type__": "cc.Vec2",
"x": -95.2,
"y": 21.8
"x": -5.5,
"y": 43.9
},
{
"__type__": "cc.Vec2",
"x": -50.4,
"y": 56.2
},
{
"__type__": "cc.Vec2",
"x": -135.5,
"y": 37.8
},
{
"__type__": "cc.Vec2",
"x": -167.6,
"y": -32.3
},
{
"__type__": "cc.Vec2",
"x": -170.4,
"y": -49
}
],
"_id": "d8mHJtH4JD8ZrhBhtFdQqX"
"_id": "79mvxrrW1O0oNGfg5khgek"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "425a06b7-01b8-4866-a416-35dfcc13a2ee"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "aewoB1GZ1B9ZMOqjjEcRpM"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_type": 1,
"_allowSleep": true,
"_gravityScale": 1,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": false,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "8ahRt8QvFAT708XisBhQuJ"
},
{
"__type__": "cc.PhysicsPolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -38,
"y": -60.2
},
{
"__type__": "cc.Vec2",
"x": -27.9,
"y": -24.3
},
{
"__type__": "cc.Vec2",
"x": 18.3,
"y": 20.4
},
{
"__type__": "cc.Vec2",
"x": 119.1,
"y": 5.7
},
{
"__type__": "cc.Vec2",
"x": 143,
"y": 60.2
},
{
"__type__": "cc.Vec2",
"x": 84.2,
"y": 124.7
},
{
"__type__": "cc.Vec2",
"x": -124.7,
"y": -0.7
},
{
"__type__": "cc.Vec2",
"x": -146.8,
"y": -90.5
},
{
"__type__": "cc.Vec2",
"x": -93.5,
"y": -104
}
],
"_id": "67LnPQQvBBr7bWfPiXPAUk"
},
{
"__type__": "cc.Node",
"_name": "jar-broke-final-2_0016_3",
"_name": "jar-broke-final-2_0017_2",
"_objFlags": 0,
"_parent": {
"__id__": 63
......@@ -3176,8 +3204,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 339,
"height": 291
"width": 349,
"height": 221
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3188,8 +3216,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-168.789,
142.825,
84.16,
233.719,
0,
0,
0,
......@@ -3211,11 +3239,11 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "73+jEEFyJESZScFBVSf1DT"
"_id": "a9JfLpV0dJbY6zy5gpBDGg"
},
{
"__type__": "cc.Node",
"_name": "top-left-1",
"_name": "top-right-1",
"_objFlags": 0,
"_parent": {
"__id__": 78
......@@ -3238,7 +3266,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 180,
"width": 116,
"height": 122
},
"_anchorPoint": {
......@@ -3250,8 +3278,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-19.401,
-12.19,
37.126,
-37.68,
0,
0,
0,
......@@ -3273,7 +3301,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e1baNwmR5Oe5bRuqcAWIrV"
"_id": "3djTLa4m1KAIx8yYzv2Kmj"
},
{
"__type__": "cc.Sprite",
......@@ -3291,7 +3319,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "39948bf7-7854-493b-8a4f-ab128b157537"
"__uuid__": "ceecd93a-1811-4049-b91f-bb94c026c178"
},
"_type": 0,
"_sizeMode": 1,
......@@ -3305,11 +3333,11 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "06faKPWXZFvrcpJb+PsdCq"
"_id": "eckVDI1yNK4IELPWP0hRQe"
},
{
"__type__": "cc.Node",
"_name": "top-left-2",
"_name": "top-right-2",
"_objFlags": 0,
"_parent": {
"__id__": 78
......@@ -3332,8 +3360,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 268,
"height": 204
"width": 298,
"height": 155
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3344,8 +3372,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
25.141,
1.475,
20.404,
-24.545,
0,
0,
0,
......@@ -3367,7 +3395,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "fdBJ9FsAhDq4qt7qoS0fFu"
"_id": "517nkLcu5LTqbVsI1lNo/1"
},
{
"__type__": "cc.Sprite",
......@@ -3385,7 +3413,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4b3ce04f-1f95-46cf-811f-f1b871e050be"
"__uuid__": "2a472542-18a6-40c6-90b7-83065f0e0ba3"
},
"_type": 0,
"_sizeMode": 1,
......@@ -3399,7 +3427,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "81sKr2afJJbKuUv2aB4EOl"
"_id": "2b6s2+B8VBxaNmK51pqRJp"
},
{
"__type__": "6c740VuPjRONJYF5qy87yUs",
......@@ -3409,7 +3437,9 @@
"__id__": 78
},
"_enabled": true,
"_id": "0ejbJB9ipO9ZV718vF+OtA"
"fragmentLink": null,
"isBottom": false,
"_id": "baZJk47LtKZ4MjF7H+AxgZ"
},
{
"__type__": "cc.Sprite",
......@@ -3427,7 +3457,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d5ca449a-529a-4216-bb67-9a9f8034ff24"
"__uuid__": "1fa6c0dd-e896-436a-8186-ac0a802f0bb2"
},
"_type": 0,
"_sizeMode": 1,
......@@ -3441,7 +3471,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "e0anJmem9C0Y+e3gOv/X8X"
"_id": "66nrUuS5NMyYxsmUEkVatk"
},
{
"__type__": "cc.RigidBody",
......@@ -3466,7 +3496,7 @@
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "12qLJLC/VLS5WGYZ7osWjt"
"_id": "68xnfMZ3dO7IiGGZbhAsQm"
},
{
"__type__": "cc.PhysicsPolygonCollider",
......@@ -3490,81 +3520,61 @@
"points": [
{
"__type__": "cc.Vec2",
"x": -38.4,
"y": -123.1
},
{
"__type__": "cc.Vec2",
"x": -12.3,
"y": -73.5
},
{
"__type__": "cc.Vec2",
"x": 78,
"y": -73.6
"x": -81.2,
"y": -32.5
},
{
"__type__": "cc.Vec2",
"x": 63.4,
"y": -7.9
"x": -20.9,
"y": -30.3
},
{
"__type__": "cc.Vec2",
"x": 155.1,
"y": 55.6
"x": 41.2,
"y": -97.2
},
{
"__type__": "cc.Vec2",
"x": 168.2,
"y": 75.7
"x": 149.8,
"y": -97
},
{
"__type__": "cc.Vec2",
"x": 158.9,
"y": 112.8
"x": 172.6,
"y": -67.6
},
{
"__type__": "cc.Vec2",
"x": 81.9,
"y": 144.8
"x": 106.1,
"y": 66.2
},
{
"__type__": "cc.Vec2",
"x": 60.7,
"y": 124.4
"x": -28.1,
"y": 108.9
},
{
"__type__": "cc.Vec2",
"x": 51.5,
"y": 87.9
"x": -48,
"y": 62.9
},
{
"__type__": "cc.Vec2",
"x": -5.5,
"y": 43.9
"x": -148.6,
"y": 78.4
},
{
"__type__": "cc.Vec2",
"x": -50.4,
"y": 56.2
"x": -173,
"y": 54.2
},
{
"__type__": "cc.Vec2",
"x": -135.5,
"y": 37.8
},
{
"__type__": "cc.Vec2",
"x": -167.6,
"y": -32.3
},
{
"__type__": "cc.Vec2",
"x": -170.4,
"y": -49
"x": -95.2,
"y": 21.8
}
],
"_id": "79mvxrrW1O0oNGfg5khgek"
"_id": "d8mHJtH4JD8ZrhBhtFdQqX"
},
{
"__type__": "cc.Node",
......@@ -3587,13 +3597,13 @@
"__id__": 92
},
{
"__id__": 93
"__id__": 98
},
{
"__id__": 94
"__id__": 99
},
{
"__id__": 95
"__id__": 100
}
],
"_prefab": null,
......@@ -3840,8 +3850,242 @@
"__id__": 87
},
"_enabled": true,
"fragmentLink": {
"__id__": 93
},
"isBottom": false,
"_id": "1dLbgMJxtJm60m86RFaEKR"
},
{
"__type__": "cc.Node",
"_name": "jar-broke-final-2_0012_7",
"_objFlags": 0,
"_parent": {
"__id__": 63
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 94
},
{
"__id__": 95
},
{
"__id__": 96
},
{
"__id__": 97
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
"height": 257
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
153.516,
5.315,
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": "deCXNQjFpBdYKY1UGSHgR3"
},
{
"__type__": "6c740VuPjRONJYF5qy87yUs",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
},
"_enabled": true,
"fragmentLink": {
"__id__": 87
},
"isBottom": false,
"_id": "1d1M+kgsZOa5/6kKn4oLby"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f38ef145-2f89-4d27-b401-44e282d1d1e6"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a9EkBtQxdFMJqj0nEbt/cO"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
},
"_enabled": true,
"_type": 1,
"_allowSleep": true,
"_gravityScale": 1,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": false,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "90jiFsYSZAFKL+FSlJZqrS"
},
{
"__type__": "cc.PhysicsPolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -85.2,
"y": -71.8
},
{
"__type__": "cc.Vec2",
"x": -32.8,
"y": -53.6
},
{
"__type__": "cc.Vec2",
"x": 55.1,
"y": -74.7
},
{
"__type__": "cc.Vec2",
"x": 93.1,
"y": -122.5
},
{
"__type__": "cc.Vec2",
"x": 137.7,
"y": -52.1
},
{
"__type__": "cc.Vec2",
"x": 87.3,
"y": -38.7
},
{
"__type__": "cc.Vec2",
"x": 34.2,
"y": 43
},
{
"__type__": "cc.Vec2",
"x": -8.5,
"y": 51.5
},
{
"__type__": "cc.Vec2",
"x": -37.3,
"y": 105.6
},
{
"__type__": "cc.Vec2",
"x": -110.2,
"y": 127.8
},
{
"__type__": "cc.Vec2",
"x": -139.3,
"y": 26.5
},
{
"__type__": "cc.Vec2",
"x": -113.8,
"y": -32.8
},
{
"__type__": "cc.Vec2",
"x": -117.4,
"y": -37.5
}
],
"_id": "dfUZAuiFRHaaZifPZotCuG"
},
{
"__type__": "cc.Sprite",
"_name": "",
......@@ -3988,16 +4232,16 @@
"_active": true,
"_components": [
{
"__id__": 97
"__id__": 102
},
{
"__id__": 98
"__id__": 112
},
{
"__id__": 99
"__id__": 113
},
{
"__id__": 100
"__id__": 114
}
],
"_prefab": null,
......@@ -4035,148 +4279,32 @@
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "23C9swrchImJCY3aoLSnKb"
},
{
"__type__": "6c740VuPjRONJYF5qy87yUs",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"_id": "d3pm+hoBFA45P8UE//ko7r"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "203c2a13-3beb-44cc-8b51-8589323d8f14"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "89kQou5n9LKp8OEhHPXf/G"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"_type": 1,
"_allowSleep": true,
"_gravityScale": 1,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0
"y": 0,
"z": 0
},
"_angularVelocity": 0,
"_fixedRotation": false,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "dfeCwKhkVOvqKndZ9WmG/n"
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "23C9swrchImJCY3aoLSnKb"
},
{
"__type__": "cc.PhysicsPolygonCollider",
"__type__": "6c740VuPjRONJYF5qy87yUs",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
"__id__": 101
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"fragmentLink": {
"__id__": 103
},
"points": [
{
"__type__": "cc.Vec2",
"x": -82.9,
"y": -68.7
},
{
"__type__": "cc.Vec2",
"x": 21.1,
"y": -56.4
},
{
"__type__": "cc.Vec2",
"x": 122.8,
"y": -0.9
},
{
"__type__": "cc.Vec2",
"x": 115.3,
"y": 52.1
},
{
"__type__": "cc.Vec2",
"x": 27,
"y": 52.7
},
{
"__type__": "cc.Vec2",
"x": -0.1,
"y": 3.4
},
{
"__type__": "cc.Vec2",
"x": -131.8,
"y": 75.4
},
{
"__type__": "cc.Vec2",
"x": -140.5,
"y": -7.5
}
],
"_id": "768rO2gLpCEaCysI5x9pA/"
"isBottom": false,
"_id": "d3pm+hoBFA45P8UE//ko7r"
},
{
"__type__": "cc.Node",
......@@ -4187,25 +4315,25 @@
},
"_children": [
{
"__id__": 102
"__id__": 104
},
{
"__id__": 104
"__id__": 106
}
],
"_active": true,
"_components": [
{
"__id__": 106
"__id__": 108
},
{
"__id__": 107
"__id__": 109
},
{
"__id__": 108
"__id__": 110
},
{
"__id__": 109
"__id__": 111
}
],
"_prefab": null,
......@@ -4261,13 +4389,13 @@
"_name": "center-1",
"_objFlags": 0,
"_parent": {
"__id__": 101
"__id__": 103
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 103
"__id__": 105
}
],
"_prefab": null,
......@@ -4323,7 +4451,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
"__id__": 104
},
"_enabled": true,
"_materials": [
......@@ -4355,13 +4483,13 @@
"_name": "center-2",
"_objFlags": 0,
"_parent": {
"__id__": 101
"__id__": 103
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 105
"__id__": 107
}
],
"_prefab": null,
......@@ -4417,7 +4545,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 106
},
"_enabled": true,
"_materials": [
......@@ -4449,9 +4577,13 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
"__id__": 103
},
"_enabled": true,
"fragmentLink": {
"__id__": 101
},
"isBottom": false,
"_id": "e9Gf63GMJHY6/lUQxOFDRq"
},
{
......@@ -4459,7 +4591,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
"__id__": 103
},
"_enabled": true,
"_materials": [
......@@ -4491,7 +4623,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
"__id__": 103
},
"_enabled": true,
"_type": 1,
......@@ -4516,7 +4648,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
"__id__": 103
},
"_enabled": true,
"tag": 0,
......@@ -4609,93 +4741,12 @@
],
"_id": "e8fb+xiEBPApeeB08wcyGC"
},
{
"__type__": "cc.Node",
"_name": "jar-broke-final-2_0012_7",
"_objFlags": 0,
"_parent": {
"__id__": 63
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 111
},
{
"__id__": 112
},
{
"__id__": 113
},
{
"__id__": 114
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
"height": 257
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
153.516,
5.315,
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": "deCXNQjFpBdYKY1UGSHgR3"
},
{
"__type__": "6c740VuPjRONJYF5qy87yUs",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 110
},
"_enabled": true,
"_id": "1d1M+kgsZOa5/6kKn4oLby"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 110
"__id__": 101
},
"_enabled": true,
"_materials": [
......@@ -4706,7 +4757,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f38ef145-2f89-4d27-b401-44e282d1d1e6"
"__uuid__": "203c2a13-3beb-44cc-8b51-8589323d8f14"
},
"_type": 0,
"_sizeMode": 1,
......@@ -4720,14 +4771,14 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a9EkBtQxdFMJqj0nEbt/cO"
"_id": "89kQou5n9LKp8OEhHPXf/G"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 110
"__id__": 101
},
"_enabled": true,
"_type": 1,
......@@ -4745,14 +4796,14 @@
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "90jiFsYSZAFKL+FSlJZqrS"
"_id": "dfeCwKhkVOvqKndZ9WmG/n"
},
{
"__type__": "cc.PhysicsPolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 110
"__id__": 101
},
"_enabled": true,
"tag": 0,
......@@ -4769,71 +4820,46 @@
"points": [
{
"__type__": "cc.Vec2",
"x": -85.2,
"y": -71.8
},
{
"__type__": "cc.Vec2",
"x": -32.8,
"y": -53.6
},
{
"__type__": "cc.Vec2",
"x": 55.1,
"y": -74.7
},
{
"__type__": "cc.Vec2",
"x": 93.1,
"y": -122.5
},
{
"__type__": "cc.Vec2",
"x": 137.7,
"y": -52.1
},
{
"__type__": "cc.Vec2",
"x": 87.3,
"y": -38.7
"x": -82.9,
"y": -68.7
},
{
"__type__": "cc.Vec2",
"x": 34.2,
"y": 43
"x": 21.1,
"y": -56.4
},
{
"__type__": "cc.Vec2",
"x": -8.5,
"y": 51.5
"x": 122.8,
"y": -0.9
},
{
"__type__": "cc.Vec2",
"x": -37.3,
"y": 105.6
"x": 115.3,
"y": 52.1
},
{
"__type__": "cc.Vec2",
"x": -110.2,
"y": 127.8
"x": 27,
"y": 52.7
},
{
"__type__": "cc.Vec2",
"x": -139.3,
"y": 26.5
"x": -0.1,
"y": 3.4
},
{
"__type__": "cc.Vec2",
"x": -113.8,
"y": -32.8
"x": -131.8,
"y": 75.4
},
{
"__type__": "cc.Vec2",
"x": -117.4,
"y": -37.5
"x": -140.5,
"y": -7.5
}
],
"_id": "dfUZAuiFRHaaZifPZotCuG"
"_id": "768rO2gLpCEaCysI5x9pA/"
},
{
"__type__": "cc.Node",
......@@ -5109,6 +5135,8 @@
"__id__": 115
},
"_enabled": true,
"fragmentLink": null,
"isBottom": false,
"_id": "00/WS6Zv1Pd6OfigrGm9ii"
},
{
......@@ -5330,6 +5358,8 @@
"__id__": 124
},
"_enabled": true,
"fragmentLink": null,
"isBottom": true,
"_id": "5bef4tFrpOmL7kxFvulGjW"
},
{
......
......@@ -4,7 +4,13 @@ const { ccclass, property } = cc._decorator;
@ccclass
export default class FragmentJarController extends cc.Component {
@property(cc.Node)
private fragmentLink: cc.Node = null;
@property
private isBottom: 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;
......@@ -13,6 +19,7 @@ export default class FragmentJarController extends cc.Component {
onLoad() {
this._physicsCollider = this.node.getComponent(cc.PhysicsPolygonCollider);
this._physicsColliderFragmentLink = this.fragmentLink && this.fragmentLink.getComponent(cc.PhysicsPolygonCollider);
this._rg = this.node.getComponent(cc.RigidBody);
this._siblingIndex = this.node.getSiblingIndex();
this._slots = this.node.children;
......@@ -36,14 +43,21 @@ export default class FragmentJarController extends cc.Component {
}
private checkTouch(point: cc.Vec2) {
if (this._isDropped) {
if (this._isDropped || this.isBottom) {
return;
}
const pos = point.clone().subtract(cc.v2(this.node.position.x, this.node.position.y));
const isInside = cc.Intersection.pointInPolygon(pos, this._physicsCollider.points);
let isInsideFragmentLink = false;
if (this._physicsColliderFragmentLink) {
const posFragmentLink = point.clone().subtract(cc.v2(this.fragmentLink.position.x, this.fragmentLink.position.y));
isInsideFragmentLink = cc.Intersection.pointInPolygon(posFragmentLink, this._physicsColliderFragmentLink.points);
console.log('isInside', isInside, isInsideFragmentLink, this.node.name, this._physicsColliderFragmentLink.points.length)
}
let isInside = cc.Intersection.pointInPolygon(pos, this._physicsCollider.points);
if (!isInside) {
if (!isInside && !isInsideFragmentLink) {
return;
}
......@@ -62,7 +76,6 @@ export default class FragmentJarController extends cc.Component {
this._isDropped = true;
const pos = this.node.position;
this.node.setSiblingIndex(-1);
// eventTarget.emit(CHECK_FRAGMENT, this.node.name);
eventTarget.emit(CHECK_FRAGMENT, this.node);
cc.tween(this.node)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment