Commit 166ff661 by 李楚霏

调整

parent 28b0350e
...@@ -348,19 +348,19 @@ ...@@ -348,19 +348,19 @@
"__id__": 8 "__id__": 8
}, },
{ {
"__id__": 14 "__id__": 12
}, },
{ {
"__id__": 18 "__id__": 18
}, },
{ {
"__id__": 24 "__id__": 23
}, },
{ {
"__id__": 29 "__id__": 29
} }
], ],
"_active": false, "_active": true,
"_components": [], "_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
...@@ -412,7 +412,7 @@ ...@@ -412,7 +412,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "dynamicGear", "_name": "staticGear1",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 7 "__id__": 7
...@@ -428,12 +428,6 @@ ...@@ -428,12 +428,6 @@
}, },
{ {
"__id__": 11 "__id__": 11
},
{
"__id__": 12
},
{
"__id__": 13
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -459,8 +453,8 @@ ...@@ -459,8 +453,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
116.126, 20.635,
411.495, 240.17,
0, 0,
0, 0,
0, 0,
...@@ -482,7 +476,7 @@ ...@@ -482,7 +476,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "0cado+5QFFxKEB4WtNsWDN" "_id": "62CSZtRKVPpqegS4gPEPq3"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -500,7 +494,7 @@ ...@@ -500,7 +494,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "83d8cbfc-a72b-461e-ba23-ddd371a8d2a3" "__uuid__": "a49296b4-0245-4b53-b2cf-d8679eb2f79a"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 0,
...@@ -514,7 +508,7 @@ ...@@ -514,7 +508,7 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "cbGZS6S4ZGMJIJ3h//8boc" "_id": "d899sMlPZKyrzwmjLmpXSy"
}, },
{ {
"__type__": "cc.RigidBody", "__type__": "cc.RigidBody",
...@@ -526,7 +520,7 @@ ...@@ -526,7 +520,7 @@
"_enabled": true, "_enabled": true,
"_type": 1, "_type": 1,
"_allowSleep": true, "_allowSleep": true,
"_gravityScale": 0, "_gravityScale": 10000,
"_linearDamping": 0, "_linearDamping": 0,
"_angularDamping": 0, "_angularDamping": 0,
"_linearVelocity": { "_linearVelocity": {
...@@ -534,82 +528,12 @@ ...@@ -534,82 +528,12 @@
"x": 0, "x": 0,
"y": 0 "y": 0
}, },
"_angularVelocity": 0, "_angularVelocity": 200,
"_fixedRotation": false, "_fixedRotation": false,
"enabledContactListener": true, "enabledContactListener": false,
"bullet": false, "bullet": false,
"awakeOnLoad": true, "awakeOnLoad": true,
"_id": "fc/er1Rl9D2oRl/jtSXWGX" "_id": "6bb1a8XjRMgbwExmweTiv3"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 8
},
"_id": "48ENLxk1dDw5ZmE8E9ss8n"
}, },
{ {
"__type__": "cc.PhysicsPolygonCollider", "__type__": "cc.PhysicsPolygonCollider",
...@@ -633,161 +557,170 @@ ...@@ -633,161 +557,170 @@
"points": [ "points": [
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -13.9, "x": -10.1,
"y": -14.2 "y": -5.9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -10.9, "x": -5.9,
"y": -17.9 "y": -9.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -3.1, "x": -9.1,
"y": -11.7 "y": -11
},
{
"__type__": "cc.Vec2",
"x": -2.2,
"y": -14.8
},
{
"__type__": "cc.Vec2",
"x": -2.7,
"y": -10.4
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 2.5, "x": 2.5,
"y": -12.1 "y": -10.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 8.5, "x": 2.3,
"y": -17.2 "y": -14.4
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 11.9, "x": 9,
"y": -14.8 "y": -11.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 7.8, "x": 6,
"y": -9.7 "y": -9.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 10.8, "x": 10.06,
"y": -5.5 "y": -6.05
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 19.8, "x": 11.75,
"y": -7.1 "y": -8.6
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 20.8, "x": 14.55,
"y": -2.8 "y": -1.48
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 11.9, "x": 11.69,
"y": 0.3 "y": -2.23
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 11.2, "x": 11.6,
"y": 4.3 "y": 2.7
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 18, "x": 14.4,
"y": 10.7 "y": 2.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 15.8, "x": 11.8,
"y": 14.2 "y": 8.9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 7.9, "x": 10,
"y": 9.3 "y": 6
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 2.4, "x": 5.9,
"y": 12.3 "y": 10.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 1.8, "x": 8.8,
"y": 18.8 "y": 11.8
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -2, "x": 2.29,
"y": 18.8 "y": 14.73
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -3.4, "x": 3,
"y": 12.4 "y": 11.4
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -8.2, "x": -2.9,
"y": 10.1 "y": 11.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -14.4, "x": -2,
"y": 14.4 "y": 14.8
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -16.8, "x": -8.8,
"y": 11 "y": 12
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -12.1, "x": -5.9,
"y": 5.9 "y": 10.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -12.1, "x": -10.2,
"y": 0.7 "y": 6.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -20.9, "x": -11.7,
"y": -0.1 "y": 8.9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -20.4, "x": -14.7,
"y": -4.3 "y": 2.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -11.6, "x": -11.5,
"y": -4.6 "y": 3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -8.8, "x": -11.7,
"y": -8.5 "y": -1.9
}
],
"_id": "d0HID9ez1MdIb7PkKP48vV"
}, },
{ {
"__type__": "9f879YGuoROFrLJrd9nEcLA", "__type__": "cc.Vec2",
"_name": "", "x": -14.6,
"_objFlags": 0, "y": -1.6
"node": {
"__id__": 8
}, },
"_enabled": true, {
"target": null, "__type__": "cc.Vec2",
"_id": "37bS1kudtHJpdggIqY87wD" "x": -11.8,
"y": -8.5
}
],
"_id": "c5jEzfFyVJj4dk/9cVPobw"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "staticGear1", "_name": "dynamicGear2",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 7 "__id__": 7
...@@ -796,6 +729,12 @@ ...@@ -796,6 +729,12 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 13
},
{
"__id__": 14
},
{
"__id__": 15 "__id__": 15
}, },
{ {
...@@ -828,8 +767,8 @@ ...@@ -828,8 +767,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-82.125, -170.902,
240.17, 473.654,
0, 0,
0, 0,
0, 0,
...@@ -851,14 +790,14 @@ ...@@ -851,14 +790,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "62CSZtRKVPpqegS4gPEPq3" "_id": "3blKoLVz1IRr9F9bA78m6M"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 14 "__id__": 12
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -869,7 +808,7 @@ ...@@ -869,7 +808,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "a49296b4-0245-4b53-b2cf-d8679eb2f79a" "__uuid__": "83d8cbfc-a72b-461e-ba23-ddd371a8d2a3"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 0,
...@@ -883,14 +822,14 @@ ...@@ -883,14 +822,14 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "d899sMlPZKyrzwmjLmpXSy" "_id": "dbm8xmj5VEi7Ru3EGkFKEV"
}, },
{ {
"__type__": "cc.RigidBody", "__type__": "cc.RigidBody",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 14 "__id__": 12
}, },
"_enabled": true, "_enabled": true,
"_type": 1, "_type": 1,
...@@ -903,25 +842,95 @@ ...@@ -903,25 +842,95 @@
"x": 0, "x": 0,
"y": 0 "y": 0
}, },
"_angularVelocity": 200, "_angularVelocity": 0,
"_fixedRotation": false, "_fixedRotation": false,
"enabledContactListener": false, "enabledContactListener": true,
"bullet": false, "bullet": false,
"awakeOnLoad": true, "awakeOnLoad": true,
"_id": "6bb1a8XjRMgbwExmweTiv3" "_id": "c07muZZgtIhLCwTGaFPI5n"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 12
},
"_id": "f4JiP96rFH2J8IGeFS609V"
}, },
{ {
"__type__": "cc.PhysicsPolygonCollider", "__type__": "cc.PhysicsPolygonCollider",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 14 "__id__": 12
}, },
"_enabled": true, "_enabled": true,
"tag": 0, "tag": 0,
"_density": 1, "_density": 1,
"_sensor": false, "_sensor": false,
"_friction": 0.2, "_friction": 1,
"_restitution": 0, "_restitution": 0,
"body": null, "body": null,
"_offset": { "_offset": {
...@@ -932,156 +941,187 @@ ...@@ -932,156 +941,187 @@
"points": [ "points": [
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -13.9, "x": -12.1,
"y": -14.2 "y": -9.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -10.9, "x": -8.6,
"y": -17.9 "y": -11.9
},
{
"__type__": "cc.Vec2",
"x": -6.2,
"y": -10.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -3.1, "x": -3.1,
"y": -11.7 "y": -11.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 2.5, "x": -2.5,
"y": -12.1 "y": -14.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 8.5, "x": 2.1,
"y": -17.2 "y": -14.4
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 11.9, "x": 3,
"y": -14.8 "y": -11.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 7.8, "x": 5.9,
"y": -9.7 "y": -10.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 10.8, "x": 8.8,
"y": -5.5 "y": -12.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 19.8, "x": 11.9,
"y": -7.1 "y": -8.9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 20.8, "x": 10,
"y": -5.7
},
{
"__type__": "cc.Vec2",
"x": 11.5,
"y": -2.8 "y": -2.8
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 11.9, "x": 14.7,
"y": 0.3 "y": -2.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 11.2, "x": 14.7,
"y": 4.3 "y": 2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 18, "x": 11,
"y": 10.7 "y": 3.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 15.8, "x": 10,
"y": 14.2 "y": 5.9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 7.9, "x": 11.7,
"y": 9.3 "y": 9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 2.4, "x": 8.8,
"y": 12.3 "y": 11.9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 1.8, "x": 5.8,
"y": 18.8 "y": 10
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -2, "x": 3.1,
"y": 18.8 "y": 11.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -3.4, "x": 2.2,
"y": 12.4 "y": 14.8
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -8.2, "x": -2.14,
"y": 14.82
},
{
"__type__": "cc.Vec2",
"x": -2.7,
"y": 11.5
},
{
"__type__": "cc.Vec2",
"x": -5.7,
"y": 10.1 "y": 10.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -14.4, "x": -8.6,
"y": 14.4 "y": 12
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -16.8, "x": -11.5,
"y": 11 "y": 9.5
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -12.1, "x": -10,
"y": 5.9 "y": 6.5
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -12.1, "x": -11.1,
"y": 0.7 "y": 3.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -20.9, "x": -14.8,
"y": -0.1 "y": 2.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -20.4, "x": -14.6,
"y": -4.3 "y": -2.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -11.6, "x": -11.5,
"y": -4.6 "y": -2.7
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -8.8, "x": -10.3,
"y": -8.5 "y": -5.8
} }
], ],
"_id": "f86k+L/d1Aqqi7ptHNUblC" "_id": "29GJK8y0hMx4mZZhkH+J0z"
},
{
"__type__": "9f879YGuoROFrLJrd9nEcLA",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"target": null,
"_id": "16D4xhCDBPZ5vZpQJqDCvQ"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "dynamicGear2", "_name": "staticGear2",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 7 "__id__": 7
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 19 "__id__": 19
...@@ -1094,9 +1134,6 @@ ...@@ -1094,9 +1134,6 @@
}, },
{ {
"__id__": 22 "__id__": 22
},
{
"__id__": 23
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1122,8 +1159,8 @@ ...@@ -1122,8 +1159,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-170.902, 37.184,
473.654, -65.525,
0, 0,
0, 0,
0, 0,
...@@ -1145,7 +1182,7 @@ ...@@ -1145,7 +1182,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "3blKoLVz1IRr9F9bA78m6M" "_id": "cbO9W9uiZLno2rmBlJSafk"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -1155,124 +1192,54 @@ ...@@ -1155,124 +1192,54 @@
"__id__": 18 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
{ {
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
} }
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "83d8cbfc-a72b-461e-ba23-ddd371a8d2a3" "__uuid__": "a49296b4-0245-4b53-b2cf-d8679eb2f79a"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "dbm8xmj5VEi7Ru3EGkFKEV"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"_type": 1,
"_allowSleep": true,
"_gravityScale": 0,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": false,
"enabledContactListener": true,
"bullet": false,
"awakeOnLoad": true,
"_id": "c07muZZgtIhLCwTGaFPI5n"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
}, },
"hoverColor": { "_type": 0,
"__type__": "cc.Color", "_sizeMode": 0,
"r": 255, "_fillType": 0,
"g": 255, "_fillCenter": {
"b": 255, "__type__": "cc.Vec2",
"a": 255 "x": 0,
"y": 0
}, },
"_N$disabledColor": { "_fillStart": 0,
"__type__": "cc.Color", "_fillRange": 0,
"r": 124, "_isTrimmedMode": true,
"g": 124, "_atlas": null,
"b": 124, "_id": "5aw9RPVdREKKOUrkvYpWn8"
"a": 255
}, },
"_N$normalSprite": null, {
"_N$pressedSprite": null, "__type__": "cc.RigidBody",
"pressedSprite": null, "_name": "",
"_N$hoverSprite": null, "_objFlags": 0,
"hoverSprite": null, "node": {
"_N$disabledSprite": null,
"_N$target": {
"__id__": 18 "__id__": 18
}, },
"_id": "f4JiP96rFH2J8IGeFS609V" "_enabled": true,
"_type": 1,
"_allowSleep": true,
"_gravityScale": 0,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": false,
"enabledContactListener": true,
"bullet": false,
"awakeOnLoad": true,
"_id": "0acC0Y7/dIDJyVVmCGFQnC"
}, },
{ {
"__type__": "cc.PhysicsPolygonCollider", "__type__": "cc.PhysicsPolygonCollider",
...@@ -1285,7 +1252,7 @@ ...@@ -1285,7 +1252,7 @@
"tag": 0, "tag": 0,
"_density": 1, "_density": 1,
"_sensor": false, "_sensor": false,
"_friction": 1, "_friction": 0.2,
"_restitution": 0, "_restitution": 0,
"body": null, "body": null,
"_offset": { "_offset": {
...@@ -1435,30 +1402,32 @@ ...@@ -1435,30 +1402,32 @@
"y": -8.5 "y": -8.5
} }
], ],
"_id": "29GJK8y0hMx4mZZhkH+J0z" "_id": "a8vVtofPNJ96eXNdHqBz3C"
}, },
{ {
"__type__": "9f879YGuoROFrLJrd9nEcLA", "__type__": "554acE3G1pCNrN4/0aHxvon",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 18 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"target": null, "_id": "f1yMyd4RJEWYKqpqa+UGXO"
"_id": "16D4xhCDBPZ5vZpQJqDCvQ"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "staticGear2", "_name": "dynamicGear",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 7 "__id__": 7
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 24
},
{
"__id__": 25 "__id__": 25
}, },
{ {
...@@ -1494,8 +1463,8 @@ ...@@ -1494,8 +1463,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
37.184, 123.365,
-65.525, 473.654,
0, 0,
0, 0,
0, 0,
...@@ -1517,14 +1486,14 @@ ...@@ -1517,14 +1486,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "cbO9W9uiZLno2rmBlJSafk" "_id": "e8Ibi/wqdDtoXD7yQzcU2o"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 23
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1535,7 +1504,7 @@ ...@@ -1535,7 +1504,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "a49296b4-0245-4b53-b2cf-d8679eb2f79a" "__uuid__": "83d8cbfc-a72b-461e-ba23-ddd371a8d2a3"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 0,
...@@ -1549,19 +1518,19 @@ ...@@ -1549,19 +1518,19 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "5aw9RPVdREKKOUrkvYpWn8" "_id": "daO4QVRLxF+ZArOSNn1QwW"
}, },
{ {
"__type__": "cc.RigidBody", "__type__": "cc.RigidBody",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 23
}, },
"_enabled": true, "_enabled": true,
"_type": 1, "_type": 1,
"_allowSleep": true, "_allowSleep": true,
"_gravityScale": 0, "_gravityScale": 1,
"_linearDamping": 0, "_linearDamping": 0,
"_angularDamping": 0, "_angularDamping": 0,
"_linearVelocity": { "_linearVelocity": {
...@@ -1574,20 +1543,90 @@ ...@@ -1574,20 +1543,90 @@
"enabledContactListener": true, "enabledContactListener": true,
"bullet": false, "bullet": false,
"awakeOnLoad": true, "awakeOnLoad": true,
"_id": "0acC0Y7/dIDJyVVmCGFQnC" "_id": "8fsRLIib9D0qw9vfrYzVTL"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 23
},
"_id": "88ANXEoDhIH4HO8EE4oG0b"
}, },
{ {
"__type__": "cc.PhysicsPolygonCollider", "__type__": "cc.PhysicsPolygonCollider",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 23
}, },
"_enabled": true, "_enabled": true,
"tag": 0, "tag": 0,
"_density": 1, "_density": 1,
"_sensor": false, "_sensor": false,
"_friction": 0.2, "_friction": 1,
"_restitution": 0, "_restitution": 0,
"body": null, "body": null,
"_offset": { "_offset": {
...@@ -1598,156 +1637,177 @@ ...@@ -1598,156 +1637,177 @@
"points": [ "points": [
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -13.9, "x": -10.1,
"y": -14.2 "y": -5.9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -10.9, "x": -5.9,
"y": -17.9 "y": -9.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -3.1, "x": -9.1,
"y": -11.7 "y": -11
},
{
"__type__": "cc.Vec2",
"x": -2.2,
"y": -14.8
},
{
"__type__": "cc.Vec2",
"x": -2.7,
"y": -10.4
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 2.5, "x": 2.5,
"y": -12.1 "y": -10.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 8.5, "x": 2.3,
"y": -17.2 "y": -14.4
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 11.9, "x": 9,
"y": -14.8 "y": -11.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 7.8, "x": 6,
"y": -9.7 "y": -9.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 10.8, "x": 10.06,
"y": -5.5 "y": -6.05
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 19.8, "x": 11.75,
"y": -7.1 "y": -8.6
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 20.8, "x": 14.55,
"y": -2.8 "y": -1.48
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 11.9, "x": 11.69,
"y": 0.3 "y": -2.23
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 11.2, "x": 11.6,
"y": 4.3 "y": 2.7
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 18, "x": 14.4,
"y": 10.7 "y": 2.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 15.8, "x": 11.8,
"y": 14.2 "y": 8.9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 7.9, "x": 10,
"y": 9.3 "y": 6
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 2.4, "x": 5.9,
"y": 12.3 "y": 10.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 1.8, "x": 8.8,
"y": 18.8 "y": 11.8
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -2, "x": 2.29,
"y": 18.8 "y": 14.73
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -3.4, "x": 3,
"y": 12.4 "y": 11.4
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -8.2, "x": -2.9,
"y": 10.1 "y": 11.3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -14.4, "x": -2,
"y": 14.4 "y": 14.8
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -16.8, "x": -8.8,
"y": 11 "y": 12
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -12.1, "x": -5.9,
"y": 5.9 "y": 10.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -12.1, "x": -10.2,
"y": 0.7 "y": 6.2
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -20.9, "x": -11.7,
"y": -0.1 "y": 8.9
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -20.4, "x": -14.7,
"y": -4.3 "y": 2.1
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -11.6, "x": -11.5,
"y": -4.6 "y": 3
}, },
{ {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -8.8, "x": -11.7,
"y": -1.9
},
{
"__type__": "cc.Vec2",
"x": -14.6,
"y": -1.6
},
{
"__type__": "cc.Vec2",
"x": -11.8,
"y": -8.5 "y": -8.5
} }
], ],
"_id": "a8vVtofPNJ96eXNdHqBz3C" "_id": "d1wXbPasBFx4C/okSXW1OQ"
}, },
{ {
"__type__": "554acE3G1pCNrN4/0aHxvon", "__type__": "9f879YGuoROFrLJrd9nEcLA",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 23
}, },
"_enabled": true, "_enabled": true,
"_id": "f1yMyd4RJEWYKqpqa+UGXO" "target": null,
"_id": "50JHFGkF1ALI58dIjkQVsO"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -1783,8 +1843,8 @@ ...@@ -1783,8 +1843,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 30, "width": 111,
"height": 100 "height": 649
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1795,16 +1855,16 @@ ...@@ -1795,16 +1855,16 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-257.597, -199.188,
-230.243, 0,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
5, 1,
5, 1,
5 1
] ]
}, },
"_eulerAngles": { "_eulerAngles": {
...@@ -1818,7 +1878,7 @@ ...@@ -1818,7 +1878,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "63KGu4tbhMCoOTYBxnA55d" "_id": "4c972fFCNEtJB37dlYOP9f"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -1839,7 +1899,7 @@ ...@@ -1839,7 +1899,7 @@
"__uuid__": "7884c6b0-ce6a-438b-a8db-6755ad7552e7" "__uuid__": "7884c6b0-ce6a-438b-a8db-6755ad7552e7"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 1,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1850,7 +1910,7 @@ ...@@ -1850,7 +1910,7 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "40CtcnNJVCE7HOc9hlShm5" "_id": "94MJZyMOtNuasZJIubPN/d"
}, },
{ {
"__type__": "cc.RigidBody", "__type__": "cc.RigidBody",
...@@ -1875,7 +1935,7 @@ ...@@ -1875,7 +1935,7 @@
"enabledContactListener": true, "enabledContactListener": true,
"bullet": false, "bullet": false,
"awakeOnLoad": true, "awakeOnLoad": true,
"_id": "06rww2j4FHqoS/goE0ZQGq" "_id": "f4pyloeoFLn6TqD4uwjpQy"
}, },
{ {
"__type__": "cc.PhysicsBoxCollider", "__type__": "cc.PhysicsBoxCollider",
...@@ -1893,15 +1953,15 @@ ...@@ -1893,15 +1953,15 @@
"body": null, "body": null,
"_offset": { "_offset": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 1.5, "x": 0,
"y": 0 "y": 0
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 20, "width": 111,
"height": 100 "height": 649
}, },
"_id": "8bqNLX7ONBwIW7wgnZJo/Q" "_id": "d4uA7n5KBNI6L0ksG0PQY0"
}, },
{ {
"__type__": "0a49by9EpRC1KDzTww1GyH5", "__type__": "0a49by9EpRC1KDzTww1GyH5",
...@@ -1913,7 +1973,7 @@ ...@@ -1913,7 +1973,7 @@
"_enabled": true, "_enabled": true,
"label": null, "label": null,
"text": "hello", "text": "hello",
"_id": "2cDPXaikdLd7Xu6zG3d32p" "_id": "a87n4hhbRAuIbBkCN8SUGE"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -1984,7 +2044,7 @@ ...@@ -1984,7 +2044,7 @@
"__id__": 153 "__id__": 153
} }
], ],
"_active": true, "_active": false,
"_components": [], "_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
......
...@@ -18,23 +18,18 @@ export default class NewClass extends cc.Component { ...@@ -18,23 +18,18 @@ export default class NewClass extends cc.Component {
collider: cc.PhysicsPolygonCollider; collider: cc.PhysicsPolygonCollider;
startPoint: cc.Vec2; startPoint: cc.Vec2;
tween: any; tween: any;
points: cc.Vec2;
// LIFE-CYCLE CALLBACKS: // LIFE-CYCLE CALLBACKS:
onPreSolve(contact, selfCollider, otherCollider) { onPreSolve(contact, selfCollider, otherCollider) {
// console.error(otherCollider.node.name); // console.error(contact);
// if (otherCollider && otherCollider.node.getComponent(cc.MotorJoint)) { const worldManifold = contact.getWorldManifold();
// // this.rigidBody.awake = false; this.points = worldManifold.normal;
// console.error(selfCollider.name);
// otherCollider.node.addComponent(cc.MotorJoint);
// const motor = otherCollider.node.getComponent(cc.MotorJoint);
// motor.connectedBody = this.node;
// motor.maxTorque = -200;
// }
// const motorJoint =this.node.getComponent(cc.MotorJoint);
// motorJoint.connectedBody = otherCollider.node;
// console.error(motorJoint.connectedBody.name);
if (otherCollider.node.name.includes('staticGear')) { if (otherCollider.node.name.includes('staticGear')) {
this.scheduleOnce(() => {
this.node.position = cc.v3(this.points.x, this.points.y, 0);
this.rigidBody.angularVelocity = - otherCollider.node.getComponent(cc.RigidBody).angularVelocity; this.rigidBody.angularVelocity = - otherCollider.node.getComponent(cc.RigidBody).angularVelocity;
},0);
} }
} }
...@@ -48,8 +43,6 @@ export default class NewClass extends cc.Component { ...@@ -48,8 +43,6 @@ export default class NewClass extends cc.Component {
} }
onEnable() { onEnable() {
clientEvent.on('move', this.move, this);
clientEvent.on('moveEnd', this.moveEnd, this);
} }
initEvent() { initEvent() {
...@@ -92,17 +85,11 @@ export default class NewClass extends cc.Component { ...@@ -92,17 +85,11 @@ export default class NewClass extends cc.Component {
} }
move(dir) { move(dir) {
console.error('move'); this.node.position = dir;
this.tween = cc.tween(this.node)
.to(1, {position: dir})
.start()
// this.node.position = dir;
// this.rigidBody.awake = true; // this.rigidBody.awake = true;
cc.director.getPhysicsManager().enabled = false; cc.director.getPhysicsManager().enabled = false;
} }
moveEnd() { moveEnd() {
console.error('moveEnd');
this.tween.stop();
cc.director.getPhysicsManager().enabled = true; cc.director.getPhysicsManager().enabled = true;
} }
......
...@@ -61,7 +61,6 @@ export default class NewClass extends cc.Component { ...@@ -61,7 +61,6 @@ export default class NewClass extends cc.Component {
} }
_touchMoveEvent(event: cc.Event.EventTouch) { _touchMoveEvent(event: cc.Event.EventTouch) {
var touches = event.getTouches(); var touches = event.getTouches();
let oldPos = this.node.parent.convertToNodeSpaceAR(touches[0].getStartLocation());
let newPos = this.node.parent.convertToNodeSpaceAR(touches[0].getLocation()); let newPos = this.node.parent.convertToNodeSpaceAR(touches[0].getLocation());
// let subPos = oldPos.sub(newPos); // let subPos = oldPos.sub(newPos);
// let dir = cc.v3(this.nodePos.x - subPos.x, this.nodePos.y - subPos.y, 0); // let dir = cc.v3(this.nodePos.x - subPos.x, this.nodePos.y - subPos.y, 0);
......
...@@ -32,7 +32,7 @@ export default class NewClass extends cc.Component { ...@@ -32,7 +32,7 @@ export default class NewClass extends cc.Component {
// const motorJoint =this.node.getComponent(cc.MotorJoint); // const motorJoint =this.node.getComponent(cc.MotorJoint);
// motorJoint.connectedBody = otherCollider.node; // motorJoint.connectedBody = otherCollider.node;
// console.error(motorJoint.connectedBody.name); // console.error(motorJoint.connectedBody.name);
this.rigidBody.linearVelocity = cc.v2(0, otherCollider.node.getComponent(cc.RigidBody).angularVelocity * 3); this.rigidBody.linearVelocity = cc.v2(0, -otherCollider.node.getComponent(cc.RigidBody).angularVelocity * 3);
} }
onPostSolve(contact, selfCollider, otherCollider) { onPostSolve(contact, selfCollider, otherCollider) {
this.rigidBody.linearVelocity = cc.v2(0, 0); this.rigidBody.linearVelocity = cc.v2(0, 0);
......
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 sign in to comment