Commit 7f8d940a authored by Nguyễn Quang Sáng's avatar Nguyễn Quang Sáng

8/8/2023 commit

parent 49befe32
...@@ -3,40 +3,46 @@ ...@@ -3,40 +3,46 @@
"_name": "DogHurt", "_name": "DogHurt",
"_objFlags": 0, "_objFlags": 0,
"_native": "", "_native": "",
"_duration": 1.95, "_duration": 1.5,
"sample": 60, "sample": 60,
"speed": 1, "speed": 1,
"wrapMode": 2, "wrapMode": 1,
"curveData": { "curveData": {
"comps": { "comps": {
"cc.Sprite": { "cc.Sprite": {
"spriteFrame": [ "spriteFrame": [
{ {
"frame": 0, "frame": 0,
"value": {
"__uuid__": "4ff76bbf-c911-4902-91c9-ef49bf98c729"
}
},
{
"frame": 0.5166666666666667,
"value": { "value": {
"__uuid__": "38c79659-6b2e-47c5-91bf-67ad64c2df64" "__uuid__": "38c79659-6b2e-47c5-91bf-67ad64c2df64"
} }
}, },
{ {
"frame": 0.4666666666666667, "frame": 0.7666666666666667,
"value": { "value": {
"__uuid__": "fc34febd-017d-4959-824a-5ce4fec06ef7" "__uuid__": "fc34febd-017d-4959-824a-5ce4fec06ef7"
} }
}, },
{ {
"frame": 0.9833333333333333, "frame": 1,
"value": { "value": {
"__uuid__": "38c79659-6b2e-47c5-91bf-67ad64c2df64" "__uuid__": "38c79659-6b2e-47c5-91bf-67ad64c2df64"
} }
}, },
{ {
"frame": 1.4833333333333334, "frame": 1.2666666666666666,
"value": { "value": {
"__uuid__": "fc34febd-017d-4959-824a-5ce4fec06ef7" "__uuid__": "fc34febd-017d-4959-824a-5ce4fec06ef7"
} }
}, },
{ {
"frame": 1.9333333333333333, "frame": 1.4833333333333334,
"value": { "value": {
"__uuid__": "38c79659-6b2e-47c5-91bf-67ad64c2df64" "__uuid__": "38c79659-6b2e-47c5-91bf-67ad64c2df64"
} }
......
...@@ -166,9 +166,9 @@ ...@@ -166,9 +166,9 @@
}, },
"_angularVelocity": 0, "_angularVelocity": 0,
"_fixedRotation": true, "_fixedRotation": true,
"enabledContactListener": false, "enabledContactListener": true,
"bullet": false, "bullet": false,
"awakeOnLoad": true, "awakeOnLoad": false,
"_id": "" "_id": ""
}, },
{ {
...@@ -179,11 +179,11 @@ ...@@ -179,11 +179,11 @@
"__id__": 1 "__id__": 1
}, },
"_enabled": true, "_enabled": true,
"tag": 0, "tag": 1,
"_density": 1, "_density": 0,
"_sensor": false, "_sensor": false,
"_friction": 0.2, "_friction": 0.2,
"_restitution": 0, "_restitution": 1,
"body": null, "body": null,
"_offset": { "_offset": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
......
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "Dog",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
},
{
"__id__": 3
},
{
"__id__": 4
},
{
"__id__": 5
},
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 98,
"height": 99
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
517.374,
271.798,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "fa88432e-2413-4fb7-8239-25cbf06c5dec"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "66c0dT0+4VDrr9JdiNMsqQf",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_id": ""
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "290ab410-a8d5-48d8-823a-18a941908c17"
},
"_clips": [
{
"__uuid__": "290ab410-a8d5-48d8-823a-18a941908c17"
},
{
"__uuid__": "e912ae40-0d1e-48f8-8d19-83f8d215dbd4"
},
{
"__uuid__": "b8789b21-46a2-4096-b3f3-87e769faf7db"
}
],
"playOnLoad": true,
"_id": ""
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_type": 2,
"_allowSleep": false,
"_gravityScale": 2,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": false,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": ""
},
{
"__type__": "cc.PhysicsPolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 2,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0.3,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -32.2,
"y": -41.1
},
{
"__type__": "cc.Vec2",
"x": -25.04,
"y": -44.66
},
{
"__type__": "cc.Vec2",
"x": -16.5,
"y": -47.1
},
{
"__type__": "cc.Vec2",
"x": -5.62,
"y": -48.06
},
{
"__type__": "cc.Vec2",
"x": 3.3,
"y": -48.2
},
{
"__type__": "cc.Vec2",
"x": 19.24,
"y": -46.26
},
{
"__type__": "cc.Vec2",
"x": 26.51,
"y": -43.12
},
{
"__type__": "cc.Vec2",
"x": 34.26,
"y": -39.11
},
{
"__type__": "cc.Vec2",
"x": 42.36,
"y": -31.25
},
{
"__type__": "cc.Vec2",
"x": 46.2,
"y": -22.4
},
{
"__type__": "cc.Vec2",
"x": 48.49,
"y": -15.08
},
{
"__type__": "cc.Vec2",
"x": 48.34,
"y": -6.76
},
{
"__type__": "cc.Vec2",
"x": 47.87,
"y": -2.82
},
{
"__type__": "cc.Vec2",
"x": 45.9,
"y": 7.3
},
{
"__type__": "cc.Vec2",
"x": 42.29,
"y": 14.58
},
{
"__type__": "cc.Vec2",
"x": 38.12,
"y": 20.79
},
{
"__type__": "cc.Vec2",
"x": 37.99,
"y": 27.46
},
{
"__type__": "cc.Vec2",
"x": 37.57,
"y": 30.11
},
{
"__type__": "cc.Vec2",
"x": 36.94,
"y": 33.97
},
{
"__type__": "cc.Vec2",
"x": 35.51,
"y": 39.26
},
{
"__type__": "cc.Vec2",
"x": 34.76,
"y": 40.85
},
{
"__type__": "cc.Vec2",
"x": 33.94,
"y": 42.84
},
{
"__type__": "cc.Vec2",
"x": 32.07,
"y": 45.69
},
{
"__type__": "cc.Vec2",
"x": 30.45,
"y": 47.38
},
{
"__type__": "cc.Vec2",
"x": 25.48,
"y": 48.57
},
{
"__type__": "cc.Vec2",
"x": 20.48,
"y": 44.11
},
{
"__type__": "cc.Vec2",
"x": 13.72,
"y": 36.36
},
{
"__type__": "cc.Vec2",
"x": 7.8,
"y": 37.9
},
{
"__type__": "cc.Vec2",
"x": -0.17,
"y": 37.85
},
{
"__type__": "cc.Vec2",
"x": -7.89,
"y": 37.78
},
{
"__type__": "cc.Vec2",
"x": -11.21,
"y": 37.36
},
{
"__type__": "cc.Vec2",
"x": -13.35,
"y": 36.9
},
{
"__type__": "cc.Vec2",
"x": -15.6,
"y": 39.9
},
{
"__type__": "cc.Vec2",
"x": -19.06,
"y": 43.19
},
{
"__type__": "cc.Vec2",
"x": -22.76,
"y": 45.53
},
{
"__type__": "cc.Vec2",
"x": -25.01,
"y": 46.55
},
{
"__type__": "cc.Vec2",
"x": -29.81,
"y": 45.02
},
{
"__type__": "cc.Vec2",
"x": -33.36,
"y": 40.01
},
{
"__type__": "cc.Vec2",
"x": -34.31,
"y": 34.26
},
{
"__type__": "cc.Vec2",
"x": -35.75,
"y": 27.56
},
{
"__type__": "cc.Vec2",
"x": -35.75,
"y": 23.91
},
{
"__type__": "cc.Vec2",
"x": -40.6,
"y": 18.35
},
{
"__type__": "cc.Vec2",
"x": -44.05,
"y": 12.1
},
{
"__type__": "cc.Vec2",
"x": -46.9,
"y": 3.9
},
{
"__type__": "cc.Vec2",
"x": -47.59,
"y": -6.53
},
{
"__type__": "cc.Vec2",
"x": -47.3,
"y": -18.6
},
{
"__type__": "cc.Vec2",
"x": -43.69,
"y": -28.28
},
{
"__type__": "cc.Vec2",
"x": -37.53,
"y": -35.53
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "",
"sync": false
}
]
\ No newline at end of file
{
"ver": "1.3.2",
"uuid": "e8c2cf5b-fc60-4e50-891e-a744730cceb6",
"importer": "prefab",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -27,25 +27,20 @@ ...@@ -27,25 +27,20 @@
"__id__": 17 "__id__": 17
}, },
{ {
"__id__": 24 "__id__": 20
},
{
"__id__": 27
},
{
"__id__": 32
},
{
"__id__": 35
}, },
{ {
"__id__": 38 "__id__": 25
} }
], ],
"_active": true, "_active": true,
"_components": [], "_components": [
{
"__id__": 28
}
],
"_prefab": { "_prefab": {
"__id__": 41 "__id__": 29
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -146,7 +141,7 @@ ...@@ -146,7 +141,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
517.374, 517.374,
271.798, 268.931,
0, 0,
0, 0,
0, 0,
...@@ -256,8 +251,8 @@ ...@@ -256,8 +251,8 @@
"y": 0 "y": 0
}, },
"_angularVelocity": 0, "_angularVelocity": 0,
"_fixedRotation": true, "_fixedRotation": false,
"enabledContactListener": false, "enabledContactListener": true,
"bullet": false, "bullet": false,
"awakeOnLoad": true, "awakeOnLoad": true,
"_id": "" "_id": ""
...@@ -270,7 +265,7 @@ ...@@ -270,7 +265,7 @@
"__id__": 2 "__id__": 2
}, },
"_enabled": true, "_enabled": true,
"tag": 0, "tag": 2,
"_density": 1, "_density": 1,
"_sensor": false, "_sensor": false,
"_friction": 0.2, "_friction": 0.2,
...@@ -789,32 +784,20 @@ ...@@ -789,32 +784,20 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "Bee", "_name": "Brick",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 18 "__id__": 18
},
{
"__id__": 19
},
{
"__id__": 20
},
{
"__id__": 21
},
{
"__id__": 22
} }
], ],
"_prefab": { "_prefab": {
"__id__": 23 "__id__": 19
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -826,8 +809,8 @@ ...@@ -826,8 +809,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 50, "width": 640,
"height": 40 "height": 200
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -838,8 +821,8 @@ ...@@ -838,8 +821,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
199.482, 320.119,
775.451, 100,
0, 0,
0, 0,
0, 0,
...@@ -879,10 +862,10 @@ ...@@ -879,10 +862,10 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "264c6bfd-3067-4b18-a163-8e00eb566c68" "__uuid__": "38b773db-825e-473b-a2b7-df614b3f41e8"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -896,32 +879,116 @@ ...@@ -896,32 +879,116 @@
"_id": "" "_id": ""
}, },
{ {
"__type__": "81c43rSpUFKXalhcNSxF1Ii", "__type__": "cc.PrefabInfo",
"_name": "", "root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "92E5Uv7SBA4ay2i86CvRLj",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "Grass",
"_objFlags": 0, "_objFlags": 0,
"node": { "_parent": {
"__id__": 17 "__id__": 1
}, },
"_enabled": true, "_children": [],
"_active": true,
"_components": [
{
"__id__": 21
},
{
"__id__": 22
},
{
"__id__": 23
}
],
"_prefab": {
"__id__": 24
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 20
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
320.06,
209.063,
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": "" "_id": ""
}, },
{ {
"__type__": "cc.Animation", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 17 "__id__": 20
}, },
"_enabled": true, "_enabled": true,
"_defaultClip": { "_materials": [
"__uuid__": "9210cdc7-bcf0-4f0c-bba1-7359ac324c0e"
},
"_clips": [
{ {
"__uuid__": "9210cdc7-bcf0-4f0c-bba1-7359ac324c0e" "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
} }
], ],
"playOnLoad": true, "_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "af891a65-5ee9-4e83-9e82-e0dac2d3f807"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "" "_id": ""
}, },
{ {
...@@ -929,10 +996,10 @@ ...@@ -929,10 +996,10 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 17 "__id__": 20
}, },
"_enabled": true, "_enabled": true,
"_type": 2, "_type": 1,
"_allowSleep": false, "_allowSleep": false,
"_gravityScale": 0, "_gravityScale": 0,
"_linearDamping": 0, "_linearDamping": 0,
...@@ -950,11 +1017,11 @@ ...@@ -950,11 +1017,11 @@
"_id": "" "_id": ""
}, },
{ {
"__type__": "cc.PhysicsPolygonCollider", "__type__": "cc.PhysicsBoxCollider",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 17 "__id__": 20
}, },
"_enabled": true, "_enabled": true,
"tag": 0, "tag": 0,
...@@ -968,645 +1035,97 @@ ...@@ -968,645 +1035,97 @@
"x": 0, "x": 0,
"y": 0 "y": 0
}, },
"points": [ "_size": {
{ "__type__": "cc.Size",
"__type__": "cc.Vec2", "width": 640,
"x": -25.2, "height": 20
"y": -6.84 },
}, "_id": ""
{ },
"__type__": "cc.Vec2", {
"x": -18.33, "__type__": "cc.PrefabInfo",
"y": -8.82 "root": {
}, "__id__": 1
{ },
"__type__": "cc.Vec2", "asset": {
"x": -14.82, "__id__": 0
"y": -15.09 },
}, "fileId": "cd3weXNZtET7JFturxifXF",
{ "sync": false
"__type__": "cc.Vec2", },
"x": -8.87, {
"y": -18.89 "__type__": "cc.Node",
}, "_name": "Line",
{ "_objFlags": 0,
"__type__": "cc.Vec2", "_parent": {
"x": -4.75, "__id__": 1
"y": -19.73 },
}, "_children": [],
{ "_active": true,
"__type__": "cc.Vec2", "_components": [
"x": 0.02,
"y": -19.51
},
{ {
"__type__": "cc.Vec2", "__id__": 26
"x": 5.79, }
"y": -19.08 ],
}, "_prefab": {
{ "__id__": 27
"__type__": "cc.Vec2", },
"x": 14.3, "_opacity": 255,
"y": -16.93 "_color": {
}, "__type__": "cc.Color",
{ "r": 255,
"__type__": "cc.Vec2", "g": 255,
"x": 17.6, "b": 255,
"y": -14.84 "a": 255
}, },
{ "_contentSize": {
"__type__": "cc.Vec2", "__type__": "cc.Size",
"x": 20.5, "width": 640,
"y": -10.71 "height": 5
}, },
{ "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 21.51, "x": 0.5,
"y": -8.3 "y": 0.5
}, },
{ "_trs": {
"__type__": "cc.Vec2", "__type__": "TypedArray",
"x": 21.42, "ctor": "Float64Array",
"y": -6.86 "array": [
}, 319.794,
{ 221.544,
"__type__": "cc.Vec2", 0,
"x": 23.47, 0,
"y": -4.83 0,
}, 0,
{ 1,
"__type__": "cc.Vec2", 1,
"x": 25.02, 1,
"y": -2.87 1
}, ]
{ },
"__type__": "cc.Vec2", "_eulerAngles": {
"x": 23.41, "__type__": "cc.Vec3",
"y": -1.08 "x": 0,
}, "y": 0,
{ "z": 0
"__type__": "cc.Vec2", },
"x": 21.7, "_skewX": 0,
"y": 1.28 "_skewY": 0,
}, "_is3DNode": false,
{ "_groupIndex": 0,
"__type__": "cc.Vec2", "groupIndex": 0,
"x": 18.6, "_id": ""
"y": 1.19 },
}, {
{ "__type__": "cc.Sprite",
"__type__": "cc.Vec2", "_name": "",
"x": 17.72, "_objFlags": 0,
"y": 2.53 "node": {
}, "__id__": 25
{ },
"__type__": "cc.Vec2", "_enabled": true,
"x": 18.66, "_materials": [
"y": 3.27
},
{
"__type__": "cc.Vec2",
"x": 19.92,
"y": 3.41
},
{
"__type__": "cc.Vec2",
"x": 21.31,
"y": 3.64
},
{
"__type__": "cc.Vec2",
"x": 22.12,
"y": 3.83
},
{
"__type__": "cc.Vec2",
"x": 22.4,
"y": 5.62
},
{
"__type__": "cc.Vec2",
"x": 20.99,
"y": 7.39
},
{
"__type__": "cc.Vec2",
"x": 19.72,
"y": 7.2
},
{
"__type__": "cc.Vec2",
"x": 18.27,
"y": 5.05
},
{
"__type__": "cc.Vec2",
"x": 15.78,
"y": 3.45
},
{
"__type__": "cc.Vec2",
"x": 14.6,
"y": 4.6
},
{
"__type__": "cc.Vec2",
"x": 15.7,
"y": 5.46
},
{
"__type__": "cc.Vec2",
"x": 17.46,
"y": 5.49
},
{
"__type__": "cc.Vec2",
"x": 17.58,
"y": 7.41
},
{
"__type__": "cc.Vec2",
"x": 16.62,
"y": 9.21
},
{
"__type__": "cc.Vec2",
"x": 15.44,
"y": 9.25
},
{
"__type__": "cc.Vec2",
"x": 14.2,
"y": 8.69
},
{
"__type__": "cc.Vec2",
"x": 13.21,
"y": 5.64
},
{
"__type__": "cc.Vec2",
"x": 11.39,
"y": 5.01
},
{
"__type__": "cc.Vec2",
"x": 10.29,
"y": 6.02
},
{
"__type__": "cc.Vec2",
"x": 11.53,
"y": 8.93
},
{
"__type__": "cc.Vec2",
"x": 12.05,
"y": 11.09
},
{
"__type__": "cc.Vec2",
"x": 11.37,
"y": 13.76
},
{
"__type__": "cc.Vec2",
"x": 10.17,
"y": 16.45
},
{
"__type__": "cc.Vec2",
"x": 8.29,
"y": 18.25
},
{
"__type__": "cc.Vec2",
"x": 5.19,
"y": 19.26
},
{
"__type__": "cc.Vec2",
"x": 0.68,
"y": 19.21
},
{
"__type__": "cc.Vec2",
"x": -3.12,
"y": 17.32
},
{
"__type__": "cc.Vec2",
"x": -7.01,
"y": 19.39
},
{
"__type__": "cc.Vec2",
"x": -10.33,
"y": 18.39
},
{
"__type__": "cc.Vec2",
"x": -12.72,
"y": 15.76
},
{
"__type__": "cc.Vec2",
"x": -13.9,
"y": 13.71
},
{
"__type__": "cc.Vec2",
"x": -13.69,
"y": 10.72
},
{
"__type__": "cc.Vec2",
"x": -12.71,
"y": 7.44
},
{
"__type__": "cc.Vec2",
"x": -11.92,
"y": 5.75
},
{
"__type__": "cc.Vec2",
"x": -16.01,
"y": 1.51
},
{
"__type__": "cc.Vec2",
"x": -17.84,
"y": -2.77
},
{
"__type__": "cc.Vec2",
"x": -18.39,
"y": -3.96
},
{
"__type__": "cc.Vec2",
"x": -24.45,
"y": -5.21
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 17
},
"asset": {
"__uuid__": "7c6aebf9-b0b0-4ee0-9a19-c3b7e1828a7f"
},
"fileId": "32v0OSmipJdbfQ9zNtpN8k",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "Brick",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
}
],
"_prefab": {
"__id__": 26
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
320.119,
100.07,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "38b773db-825e-473b-a2b7-df614b3f41e8"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "92E5Uv7SBA4ay2i86CvRLj",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "Grass",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 28
},
{
"__id__": 29
},
{
"__id__": 30
}
],
"_prefab": {
"__id__": 31
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 20
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
320.06,
209.063,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "af891a65-5ee9-4e83-9e82-e0dac2d3f807"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"_type": 1,
"_allowSleep": false,
"_gravityScale": 0,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": true,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": ""
},
{
"__type__": "cc.PhysicsBoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 640,
"height": 20
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "cd3weXNZtET7JFturxifXF",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "Line",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 33
}
],
"_prefab": {
"__id__": 34
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 5
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
319.794,
221.544,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"_materials": [
{ {
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
} }
...@@ -1642,197 +1161,18 @@ ...@@ -1642,197 +1161,18 @@
"sync": false "sync": false
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Animation",
"_name": "Wall",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
}
],
"_prefab": {
"__id__": 37
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50,
"height": 960
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
670.115,
483.563,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.BoxCollider",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 35
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 50,
"height": 960
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "cc5v8MbMRGxbxg+gxFLMnl",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "Wall",
"_objFlags": 0,
"_parent": {
"__id__": 1 "__id__": 1
}, },
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
}
],
"_prefab": {
"__id__": 40
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50,
"height": 960
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-29.456,
483.118,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.BoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
},
"_enabled": true, "_enabled": true,
"tag": 0, "_defaultClip": null,
"_offset": { "_clips": [],
"__type__": "cc.Vec2", "playOnLoad": false,
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 50,
"height": 960
},
"_id": "" "_id": ""
}, },
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "cdq5vp/5NC/5b9dx1886je",
"sync": false
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
......
...@@ -82,15 +82,21 @@ ...@@ -82,15 +82,21 @@
}, },
{ {
"__id__": 12 "__id__": 12
},
{
"__id__": 13
},
{
"__id__": 16
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 13 "__id__": 19
}, },
{ {
"__id__": 14 "__id__": 20
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -598,6 +604,238 @@ ...@@ -598,6 +604,238 @@
"groupIndex": 0, "groupIndex": 0,
"_id": "0760c0mvZARqBSsX2QiXWB" "_id": "0760c0mvZARqBSsX2QiXWB"
}, },
{
"__type__": "cc.Node",
"_name": "Wall",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 15
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50,
"height": 960
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-345,
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": "24fesSE41FJqsVxBlcr2NV"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"_type": 0,
"_allowSleep": false,
"_gravityScale": 1,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": true,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "e5qgEr1xJJ2ZPi+SOFl1a0"
},
{
"__type__": "cc.PhysicsBoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 50,
"height": 960
},
"_id": "21TPr2nFJNX7/Oq6xXnU4I"
},
{
"__type__": "cc.Node",
"_name": "Wall",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 17
},
{
"__id__": 18
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50,
"height": 960
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
345,
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": "10O1N4cuJIf7t7JabcuW05"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
},
"_enabled": true,
"_type": 0,
"_allowSleep": false,
"_gravityScale": 1,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": true,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "7dfggALVRB2LUTC1fkM6kd"
},
{
"__type__": "cc.PhysicsBoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 50,
"height": 960
},
"_id": "1fodx682pO5YZpZbQX/Kaa"
},
{ {
"__type__": "cc.Canvas", "__type__": "cc.Canvas",
"_name": "", "_name": "",
......
...@@ -78,10 +78,10 @@ ...@@ -78,10 +78,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 15 "__id__": 24
}, },
{ {
"__id__": 16 "__id__": 25
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "New Node", "_name": "test",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 2 "__id__": 2
...@@ -243,12 +243,18 @@ ...@@ -243,12 +243,18 @@
}, },
{ {
"__id__": 10 "__id__": 10
},
{
"__id__": 14
},
{
"__id__": 18
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 14 "__id__": 23
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -301,7 +307,7 @@ ...@@ -301,7 +307,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "New Node", "_name": "test",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 5 "__id__": 5
...@@ -448,11 +454,11 @@ ...@@ -448,11 +454,11 @@
"width": 1000, "width": 1000,
"height": 20 "height": 20
}, },
"_id": "b9K/Yan9VMkI+rWQhVsrGt" "_id": "f2jkN/3PlHVaGmzwhSacgK"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "test", "_name": "test copy",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 5 "__id__": 5
...@@ -481,8 +487,8 @@ ...@@ -481,8 +487,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 20, "width": 1000,
"height": 150 "height": 20
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -493,13 +499,13 @@ ...@@ -493,13 +499,13 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
24.007, 341.745,
238.437, 16.825,
0, 0,
0, 0,
0, 0,
-0.17364817766693033, 0.7071067811865475,
0.984807753012208, 0.7071067811865476,
1, 1,
1, 1,
1 1
...@@ -509,14 +515,14 @@ ...@@ -509,14 +515,14 @@
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0, "y": 0,
"z": -20 "z": 90
}, },
"_skewX": 0, "_skewX": 0,
"_skewY": 0, "_skewY": 0,
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "55vTzvnHpBIJn57AZzThS+" "_id": "c56+nFmjJKN6MwWcxfDp7a"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -548,7 +554,7 @@ ...@@ -548,7 +554,7 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "3ezxTjK9JKIINZ+gHEJwpI" "_id": "c0N6WvGRdLz4CeHjlyw4ud"
}, },
{ {
"__type__": "cc.RigidBody", "__type__": "cc.RigidBody",
...@@ -558,9 +564,9 @@ ...@@ -558,9 +564,9 @@
"__id__": 10 "__id__": 10
}, },
"_enabled": true, "_enabled": true,
"_type": 2, "_type": 1,
"_allowSleep": false, "_allowSleep": false,
"_gravityScale": 3, "_gravityScale": 0,
"_linearDamping": 0, "_linearDamping": 0,
"_angularDamping": 0, "_angularDamping": 0,
"_linearVelocity": { "_linearVelocity": {
...@@ -569,14 +575,14 @@ ...@@ -569,14 +575,14 @@
"y": 0 "y": 0
}, },
"_angularVelocity": 0, "_angularVelocity": 0,
"_fixedRotation": false, "_fixedRotation": true,
"enabledContactListener": false, "enabledContactListener": false,
"bullet": false, "bullet": false,
"awakeOnLoad": true, "awakeOnLoad": true,
"_id": "0aOtl5uc9D+5f8HUl0n23C" "_id": "87XSSYyXVPw5WLHXYT8FV2"
}, },
{ {
"__type__": "cc.PhysicsPolygonCollider", "__type__": "cc.PhysicsBoxCollider",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
...@@ -594,29 +600,339 @@ ...@@ -594,29 +600,339 @@
"x": 0, "x": 0,
"y": 0 "y": 0
}, },
"points": [ "_size": {
"__type__": "cc.Size",
"width": 1000,
"height": 20
},
"_id": "96lKzIM9JFX4SArA5/d0F7"
},
{
"__type__": "cc.Node",
"_name": "test copy",
"_objFlags": 0,
"_parent": {
"__id__": 5
},
"_children": [],
"_active": true,
"_components": [
{ {
"__type__": "cc.Vec2", "__id__": 15
"x": -10.3, },
"y": -74.6 {
"__id__": 16
},
{
"__id__": 17
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1000,
"height": 20
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-298.303,
16.825,
0,
0,
0,
0.7071067811865475,
0.7071067811865476,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 90
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "74ASph+U5CxJJDFxPzOmkn"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "5d+84y1DdGw7O4TFOqCLoI"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_type": 1,
"_allowSleep": false,
"_gravityScale": 0,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": true,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": "76ICVX6EJMoJ30DoqViau/"
},
{
"__type__": "cc.PhysicsBoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 1000,
"height": 20
},
"_id": "6cUsCS+htM9pa6oVaR3I5m"
},
{
"__type__": "cc.Node",
"_name": "test",
"_objFlags": 0,
"_parent": {
"__id__": 5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 19
}, },
{
"__id__": 20
},
{
"__id__": 21
},
{
"__id__": 22
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 20,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1.405,
368.808,
0,
0,
0,
-0.16010515768843164,
0.9870999637734582,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": -18.426000000000002
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "50EUui8txFdpfAqkzmjuiO"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "1blZSzOTBDLpsUXHSpUmEa"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"_type": 2,
"_allowSleep": false,
"_gravityScale": 0,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 100
},
"_angularVelocity": 0,
"_fixedRotation": false,
"enabledContactListener": true,
"bullet": false,
"awakeOnLoad": true,
"_id": "1cfiKhRzdA2Kqp7y/p6c68"
},
{
"__type__": "1a526ERoNlBJ4QDHV+iifGH",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"_id": "dbIEDAURxEga5FLJd0fT5J"
},
{
"__type__": "cc.PhysicsPolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 1,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 10.1, "x": -10,
"y": -75.2 "y": 100
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 9.9, "x": -10,
"y": 74.8 "y": -100
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -9.5, "x": 10,
"y": 74.4 "y": 0
} }
], ],
"_id": "c4jw7B7cVObaXQvTmhhUtp" "_id": "28OMGpZLpOjKDr+NNBfwOJ"
}, },
{ {
"__type__": "7aaccRSHlRDIJdCgIhB/vcq", "__type__": "7aaccRSHlRDIJdCgIhB/vcq",
......
...@@ -6,30 +6,42 @@ const { ccclass, property } = cc._decorator; ...@@ -6,30 +6,42 @@ const { ccclass, property } = cc._decorator;
export default class Bee extends cc.Component { export default class Bee extends cc.Component {
static instance: Bee; static instance: Bee;
flySpeed: number = 200; flySpeed: number = 100;
targetPosition: cc.Vec3 = null; targetPosition: cc.Node = null;
flying = false; flying = false;
timer: number = 0;
velocity: cc.Vec2 = cc.v2(0, 0);
onBeginContact(contact, selfCollider, otherCollider) {
if (otherCollider.tag == 0) {
this.node.getComponent(cc.RigidBody).linearVelocity = cc.v2(
this.velocity.x - 50,
this.velocity.y - 50
);
this.timer = 0.3;
}
}
protected onLoad(): void { protected onLoad(): void {
Bee.instance = this; Bee.instance = this;
this.targetPosition = Dog.instance.node.position;
this.node.active = true;
} }
protected update(dt: number): void { protected update(dt: number): void {
this.timer -= dt;
if (this.targetPosition && this.flying) { if (this.targetPosition && this.flying) {
let direction = this.targetPosition.sub(this.node.position); var deltaX = this.targetPosition.x - this.node.x;
var deltaY = this.targetPosition.y - this.node.y;
var direction = cc.v3(deltaX, deltaY);
this.velocity = cc.v2(
direction.x * dt * this.flySpeed,
direction.y * dt * this.flySpeed
);
let distance = direction.mag(); let distance = direction.mag();
let angle = (Math.atan2(direction.y, direction.x) * 180) / Math.PI; let angle = (Math.atan2(direction.y, direction.x) * 180) / Math.PI;
this.node.angle = angle; this.node.angle = angle;
if (distance > 1) { if (distance > 1 && this.timer < 0) {
let step = this.flySpeed * dt; this.node.getComponent(cc.RigidBody).linearVelocity = this.velocity;
let newPos = this.node.position.add(direction.normalize().mul(step));
this.node.setPosition(newPos);
} }
} }
} }
......
...@@ -3,9 +3,16 @@ const { ccclass, property } = cc._decorator; ...@@ -3,9 +3,16 @@ const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class Dog extends cc.Component { export default class Dog extends cc.Component {
static instance: Dog; static instance: Dog;
attacked = false;
protected onLoad(): void { protected onLoad(): void {
Dog.instance = this; Dog.instance = this;
} }
onBeginContact(contact, selfCollider, otherCollider) {
if (!this.attacked && otherCollider.tag == 1) {
this.attacked = true;
this.getComponent(cc.Animation).play("DogHurt");
}
}
} }
...@@ -19,7 +19,7 @@ export default class GamePlay extends cc.Component { ...@@ -19,7 +19,7 @@ export default class GamePlay extends cc.Component {
cc.director.getPhysicsManager().enabled = true; cc.director.getPhysicsManager().enabled = true;
cc.director.getCollisionManager().enabled = true; cc.director.getCollisionManager().enabled = true;
cc.director.getPhysicsManager().debugDrawFlags = 1; // cc.director.getPhysicsManager().debugDrawFlags = 1;
this.loadPrefab(); this.loadPrefab();
...@@ -41,6 +41,7 @@ export default class GamePlay extends cc.Component { ...@@ -41,6 +41,7 @@ export default class GamePlay extends cc.Component {
this.rb = this.draw.addComponent(cc.RigidBody); this.rb = this.draw.addComponent(cc.RigidBody);
this.rb.type = cc.RigidBodyType.Static; this.rb.type = cc.RigidBodyType.Static;
this.chain = this.draw.addComponent(cc.PhysicsChainCollider); this.chain = this.draw.addComponent(cc.PhysicsChainCollider);
this.chain.points = [event.getLocation()]; this.chain.points = [event.getLocation()];
} }
...@@ -56,6 +57,7 @@ export default class GamePlay extends cc.Component { ...@@ -56,6 +57,7 @@ export default class GamePlay extends cc.Component {
// this.isDrawing = false; // this.isDrawing = false;
// this.rb.type = cc.RigidBodyType.Dynamic; // this.rb.type = cc.RigidBodyType.Dynamic;
this.rb.allowSleep = false; this.rb.allowSleep = false;
this.rb.enabledContactListener = true;
Dog.instance.getComponent(cc.Animation).play("DogScare"); Dog.instance.getComponent(cc.Animation).play("DogScare");
this.chain.apply(); this.chain.apply();
Hole.instance.isSpawnable = true; Hole.instance.isSpawnable = true;
......
...@@ -5,7 +5,7 @@ const { ccclass, property } = cc._decorator; ...@@ -5,7 +5,7 @@ const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class Hole extends cc.Component { export default class Hole extends cc.Component {
static instance: Hole; static instance: Hole;
@property(cc.Prefab) private beePrefab: cc.Prefab = null; @property(cc.Prefab) beePrefab: cc.Prefab = null;
@property(cc.Float) refreshTimer: number = 0.5; @property(cc.Float) refreshTimer: number = 0.5;
@property(cc.Node) dog: cc.Node = null; @property(cc.Node) dog: cc.Node = null;
...@@ -18,7 +18,7 @@ export default class Hole extends cc.Component { ...@@ -18,7 +18,7 @@ export default class Hole extends cc.Component {
if (!this.isSpawnable) return; if (!this.isSpawnable) return;
if (this.timer > 0) return; if (this.timer > 0) return;
if (this.currentBeeAmount >= this.beeAmount) return; if (this.currentBeeAmount >= this.beeAmount) return;
this.timer = this.refreshTimer; this.timer = this.refreshTimer;
var bee = cc.instantiate(this.beePrefab); var bee = cc.instantiate(this.beePrefab);
let nodeWorldPosition = this.node.convertToWorldSpaceAR(cc.Vec2.ZERO); let nodeWorldPosition = this.node.convertToWorldSpaceAR(cc.Vec2.ZERO);
...@@ -26,10 +26,9 @@ export default class Hole extends cc.Component { ...@@ -26,10 +26,9 @@ export default class Hole extends cc.Component {
this.node.parent.parent.convertToNodeSpaceAR(nodeWorldPosition); this.node.parent.parent.convertToNodeSpaceAR(nodeWorldPosition);
bee.parent = this.node.parent.parent; bee.parent = this.node.parent.parent;
bee.position = cc.v3(nodeCanvasPosition.x, nodeCanvasPosition.y); bee.position = cc.v3(nodeCanvasPosition.x, nodeCanvasPosition.y);
bee.getComponent(Bee).targetPosition = this.dog.position; bee.getComponent(Bee).targetPosition = this.dog;
bee.getComponent(Bee).fly(); bee.getComponent(Bee).fly();
this.currentBeeAmount++; this.currentBeeAmount++;
// bee.getComponent(cc.RigidBody).linearVelocity = velocity
} }
protected update(dt: number): void { protected update(dt: number): void {
......
// Learn TypeScript:
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
const { ccclass, property } = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
onBeginContact(contact: cc.PhysicsContact, selfCollider, otherCollider) {
console.log("contact", contact);
}
protected update(dt: number): void {
this.node.y -= 5;
}
}
{
"ver": "1.1.0",
"uuid": "1a526111-a0d9-4127-8403-1d5fa289f187",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
// Learn TypeScript:
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class NewClass extends cc.Component { export default class TestPhysic extends cc.Component {
protected onLoad(): void { protected onLoad(): void {
cc.director.getPhysicsManager().enabled = true; cc.director.getPhysicsManager().enabled = true;
cc.director.getCollisionManager().enabled = true; cc.director.getCollisionManager().enabled = true;
} }
} }
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