Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
李楚霏
/
RescureMenDemo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
166ff661
authored
Jul 07, 2020
by
李楚霏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
28b0350e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
505 additions
and
459 deletions
+505
-459
rescureMen/assets/scene/test.fire
+496
-436
rescureMen/assets/script/gear.ts
+8
-21
rescureMen/assets/script/hook.ts
+0
-1
rescureMen/assets/script/rope.ts
+1
-1
No files found.
rescureMen/assets/scene/test.fire
View file @
166ff661
...
...
@@ -348,19 +348,19 @@
"__id__": 8
},
{
"__id__": 1
4
"__id__": 1
2
},
{
"__id__": 18
},
{
"__id__": 2
4
"__id__": 2
3
},
{
"__id__": 29
}
],
"_active":
fals
e,
"_active":
tru
e,
"_components": [],
"_prefab": null,
"_opacity": 255,
...
...
@@ -412,7 +412,7 @@
},
{
"__type__": "cc.Node",
"_name": "
dynamicGear
",
"_name": "
staticGear1
",
"_objFlags": 0,
"_parent": {
"__id__": 7
...
...
@@ -428,12 +428,6 @@
},
{
"__id__": 11
},
{
"__id__": 12
},
{
"__id__": 13
}
],
"_prefab": null,
...
...
@@ -459,8 +453,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
116.126
,
411.495
,
20.635
,
240.17
,
0,
0,
0,
...
...
@@ -482,7 +476,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
0cado+5QFFxKEB4WtNsWDN
"
"_id": "
62CSZtRKVPpqegS4gPEPq3
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -500,7 +494,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "
83d8cbfc-a72b-461e-ba23-ddd371a8d2a3
"
"__uuid__": "
a49296b4-0245-4b53-b2cf-d8679eb2f79a
"
},
"_type": 0,
"_sizeMode": 0,
...
...
@@ -514,7 +508,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
cbGZS6S4ZGMJIJ3h//8boc
"
"_id": "
d899sMlPZKyrzwmjLmpXSy
"
},
{
"__type__": "cc.RigidBody",
...
...
@@ -526,7 +520,7 @@
"_enabled": true,
"_type": 1,
"_allowSleep": true,
"_gravityScale": 0,
"_gravityScale":
1000
0,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
...
...
@@ -534,82 +528,12 @@
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_angularVelocity":
20
0,
"_fixedRotation": false,
"enabledContactListener":
tru
e,
"enabledContactListener":
fals
e,
"bullet": false,
"awakeOnLoad": true,
"_id": "fc/er1Rl9D2oRl/jtSXWGX"
},
{
"__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"
"_id": "6bb1a8XjRMgbwExmweTiv3"
},
{
"__type__": "cc.PhysicsPolygonCollider",
...
...
@@ -633,161 +557,170 @@
"points": [
{
"__type__": "cc.Vec2",
"x": -1
3.9
,
"y": -
14.2
"x": -1
0.1
,
"y": -
5.9
},
{
"__type__": "cc.Vec2",
"x": -
10
.9,
"y": -
17.9
"x": -
5
.9,
"y": -
9.1
},
{
"__type__": "cc.Vec2",
"x": -3.1,
"y": -11.7
"x": -9.1,
"y": -11
},
{
"__type__": "cc.Vec2",
"x": -2.2,
"y": -14.8
},
{
"__type__": "cc.Vec2",
"x": -2.7,
"y": -10.4
},
{
"__type__": "cc.Vec2",
"x": 2.5,
"y": -1
2.1
"y": -1
0.3
},
{
"__type__": "cc.Vec2",
"x":
8.5
,
"y": -1
7.2
"x":
2.3
,
"y": -1
4.4
},
{
"__type__": "cc.Vec2",
"x":
11.
9,
"y": -1
4.8
"x": 9,
"y": -1
1.3
},
{
"__type__": "cc.Vec2",
"x":
7.8
,
"y": -9.
7
"x":
6
,
"y": -9.
3
},
{
"__type__": "cc.Vec2",
"x": 10.
8
,
"y": -
5.
5
"x": 10.
06
,
"y": -
6.0
5
},
{
"__type__": "cc.Vec2",
"x": 1
9.8
,
"y": -
7.1
"x": 1
1.75
,
"y": -
8.6
},
{
"__type__": "cc.Vec2",
"x":
20.8
,
"y": -
2.
8
"x":
14.55
,
"y": -
1.4
8
},
{
"__type__": "cc.Vec2",
"x": 11.9,
"y":
0.
3
"x": 11.
6
9,
"y":
-2.2
3
},
{
"__type__": "cc.Vec2",
"x": 11.
2
,
"y":
4.3
"x": 11.
6
,
"y":
2.7
},
{
"__type__": "cc.Vec2",
"x": 1
8
,
"y":
10.7
"x": 1
4.4
,
"y":
2.2
},
{
"__type__": "cc.Vec2",
"x": 1
5
.8,
"y":
14.2
"x": 1
1
.8,
"y":
8.9
},
{
"__type__": "cc.Vec2",
"x":
7.9
,
"y":
9.3
"x":
10
,
"y":
6
},
{
"__type__": "cc.Vec2",
"x":
2.4
,
"y": 1
2.3
"x":
5.9
,
"y": 1
0.1
},
{
"__type__": "cc.Vec2",
"x":
1
.8,
"y": 1
8
.8
"x":
8
.8,
"y": 1
1
.8
},
{
"__type__": "cc.Vec2",
"x":
-2
,
"y": 1
8.8
"x":
2.29
,
"y": 1
4.73
},
{
"__type__": "cc.Vec2",
"x":
-3.4
,
"y": 1
2
.4
"x":
3
,
"y": 1
1
.4
},
{
"__type__": "cc.Vec2",
"x": -
8.2
,
"y": 1
0.1
"x": -
2.9
,
"y": 1
1.3
},
{
"__type__": "cc.Vec2",
"x": -
14.4
,
"y": 14.
4
"x": -
2
,
"y": 14.
8
},
{
"__type__": "cc.Vec2",
"x": -
16
.8,
"y": 1
1
"x": -
8
.8,
"y": 1
2
},
{
"__type__": "cc.Vec2",
"x": -
12.1
,
"y":
5.9
"x": -
5.9
,
"y":
10.2
},
{
"__type__": "cc.Vec2",
"x": -1
2.1
,
"y":
0.7
"x": -1
0.2
,
"y":
6.2
},
{
"__type__": "cc.Vec2",
"x": -
20.9
,
"y":
-0.1
"x": -
11.7
,
"y":
8.9
},
{
"__type__": "cc.Vec2",
"x": -
20.4
,
"y":
-4.3
"x": -
14.7
,
"y":
2.1
},
{
"__type__": "cc.Vec2",
"x": -11.
6
,
"y":
-4.6
"x": -11.
5
,
"y":
3
},
{
"__type__": "cc.Vec2",
"x": -8.8,
"y": -8.5
}
],
"_id": "d0HID9ez1MdIb7PkKP48vV"
"x": -11.7,
"y": -1.9
},
{
"__type__": "9f879YGuoROFrLJrd9nEcLA",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__type__": "cc.Vec2",
"x": -14.6,
"y": -1.6
},
"_enabled": true,
"target": null,
"_id": "37bS1kudtHJpdggIqY87wD"
{
"__type__": "cc.Vec2",
"x": -11.8,
"y": -8.5
}
],
"_id": "c5jEzfFyVJj4dk/9cVPobw"
},
{
"__type__": "cc.Node",
"_name": "
staticGear1
",
"_name": "
dynamicGear2
",
"_objFlags": 0,
"_parent": {
"__id__": 7
...
...
@@ -796,6 +729,12 @@
"_active": true,
"_components": [
{
"__id__": 13
},
{
"__id__": 14
},
{
"__id__": 15
},
{
...
...
@@ -828,8 +767,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-
82.125
,
240.17
,
-
170.902
,
473.654
,
0,
0,
0,
...
...
@@ -851,14 +790,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
62CSZtRKVPpqegS4gPEPq3
"
"_id": "
3blKoLVz1IRr9F9bA78m6M
"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
4
"__id__": 1
2
},
"_enabled": true,
"_materials": [
...
...
@@ -869,7 +808,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "
a49296b4-0245-4b53-b2cf-d8679eb2f79a
"
"__uuid__": "
83d8cbfc-a72b-461e-ba23-ddd371a8d2a3
"
},
"_type": 0,
"_sizeMode": 0,
...
...
@@ -883,14 +822,14 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "d
899sMlPZKyrzwmjLmpXSy
"
"_id": "d
bm8xmj5VEi7Ru3EGkFKEV
"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
4
"__id__": 1
2
},
"_enabled": true,
"_type": 1,
...
...
@@ -903,25 +842,95 @@
"x": 0,
"y": 0
},
"_angularVelocity":
20
0,
"_angularVelocity": 0,
"_fixedRotation": false,
"enabledContactListener":
fals
e,
"enabledContactListener":
tru
e,
"bullet": false,
"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",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
4
"__id__": 1
2
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction":
0.2
,
"_friction":
1
,
"_restitution": 0,
"body": null,
"_offset": {
...
...
@@ -932,156 +941,187 @@
"points": [
{
"__type__": "cc.Vec2",
"x": -1
3.9
,
"y": -
14.2
"x": -1
2.1
,
"y": -
9.1
},
{
"__type__": "cc.Vec2",
"x": -10.9,
"y": -17.9
"x": -8.6,
"y": -11.9
},
{
"__type__": "cc.Vec2",
"x": -6.2,
"y": -10.2
},
{
"__type__": "cc.Vec2",
"x": -3.1,
"y": -11.
7
"y": -11.
2
},
{
"__type__": "cc.Vec2",
"x": 2.5,
"y": -1
2.1
"x":
-
2.5,
"y": -1
4.2
},
{
"__type__": "cc.Vec2",
"x":
8.5
,
"y": -1
7.2
"x":
2.1
,
"y": -1
4.4
},
{
"__type__": "cc.Vec2",
"x":
11.9
,
"y": -1
4.8
"x":
3
,
"y": -1
1.1
},
{
"__type__": "cc.Vec2",
"x":
7.8
,
"y": -
9.7
"x":
5.9
,
"y": -
10.1
},
{
"__type__": "cc.Vec2",
"x":
10
.8,
"y": -
5.5
"x":
8
.8,
"y": -
12.3
},
{
"__type__": "cc.Vec2",
"x": 1
9.8
,
"y": -
7.1
"x": 1
1.9
,
"y": -
8.9
},
{
"__type__": "cc.Vec2",
"x": 20.8,
"x": 10,
"y": -5.7
},
{
"__type__": "cc.Vec2",
"x": 11.5,
"y": -2.8
},
{
"__type__": "cc.Vec2",
"x": 1
1.9
,
"y":
0.3
"x": 1
4.7
,
"y":
-2.1
},
{
"__type__": "cc.Vec2",
"x": 1
1.2
,
"y":
4.3
"x": 1
4.7
,
"y":
2
},
{
"__type__": "cc.Vec2",
"x": 1
8
,
"y":
10.7
"x": 1
1
,
"y":
3.2
},
{
"__type__": "cc.Vec2",
"x": 1
5.8
,
"y":
14.2
"x": 1
0
,
"y":
5.9
},
{
"__type__": "cc.Vec2",
"x":
7.9
,
"y": 9
.3
"x":
11.7
,
"y": 9
},
{
"__type__": "cc.Vec2",
"x":
2.4
,
"y": 1
2.3
"x":
8.8
,
"y": 1
1.9
},
{
"__type__": "cc.Vec2",
"x":
1
.8,
"y": 1
8.8
"x":
5
.8,
"y": 1
0
},
{
"__type__": "cc.Vec2",
"x":
-2
,
"y": 1
8.8
"x":
3.1
,
"y": 1
1.2
},
{
"__type__": "cc.Vec2",
"x":
-3.4
,
"y": 1
2.4
"x":
2.2
,
"y": 1
4.8
},
{
"__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
},
{
"__type__": "cc.Vec2",
"x": -
14.4
,
"y": 1
4.4
"x": -
8.6
,
"y": 1
2
},
{
"__type__": "cc.Vec2",
"x": -1
6.8
,
"y":
11
"x": -1
1.5
,
"y":
9.5
},
{
"__type__": "cc.Vec2",
"x": -1
2.1
,
"y":
5.9
"x": -1
0
,
"y":
6.5
},
{
"__type__": "cc.Vec2",
"x": -1
2
.1,
"y":
0.7
"x": -1
1
.1,
"y":
3.2
},
{
"__type__": "cc.Vec2",
"x": -
20.9
,
"y":
-0
.1
"x": -
14.8
,
"y":
2
.1
},
{
"__type__": "cc.Vec2",
"x": -
20.4
,
"y": -
4
.3
"x": -
14.6
,
"y": -
2
.3
},
{
"__type__": "cc.Vec2",
"x": -11.
6
,
"y": -
4.6
"x": -11.
5
,
"y": -
2.7
},
{
"__type__": "cc.Vec2",
"x": -
8.8
,
"y": -
8.5
"x": -
10.3
,
"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",
"_name": "
dynam
icGear2",
"_name": "
stat
icGear2",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 19
...
...
@@ -1094,9 +1134,6 @@
},
{
"__id__": 22
},
{
"__id__": 23
}
],
"_prefab": null,
...
...
@@ -1122,8 +1159,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-170.902
,
473.654
,
37.184
,
-65.525
,
0,
0,
0,
...
...
@@ -1145,7 +1182,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
3blKoLVz1IRr9F9bA78m6M
"
"_id": "
cbO9W9uiZLno2rmBlJSafk
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1155,124 +1192,54 @@
"__id__": 18
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "83d8cbfc-a72b-461e-ba23-ddd371a8d2a3"
},
"_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
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a49296b4-0245-4b53-b2cf-d8679eb2f79a"
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "5aw9RPVdREKKOUrkvYpWn8"
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__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",
...
...
@@ -1285,7 +1252,7 @@
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction":
1
,
"_friction":
0.2
,
"_restitution": 0,
"body": null,
"_offset": {
...
...
@@ -1435,30 +1402,32 @@
"y": -8.5
}
],
"_id": "
29GJK8y0hMx4mZZhkH+J0z
"
"_id": "
a8vVtofPNJ96eXNdHqBz3C
"
},
{
"__type__": "
9f879YGuoROFrLJrd9nEcLA
",
"__type__": "
554acE3G1pCNrN4/0aHxvon
",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"target": null,
"_id": "16D4xhCDBPZ5vZpQJqDCvQ"
"_id": "f1yMyd4RJEWYKqpqa+UGXO"
},
{
"__type__": "cc.Node",
"_name": "
staticGear2
",
"_name": "
dynamicGear
",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
{
"__id__": 24
},
{
"__id__": 25
},
{
...
...
@@ -1494,8 +1463,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
37.184
,
-65.525
,
123.365
,
473.654
,
0,
0,
0,
...
...
@@ -1517,14 +1486,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
cbO9W9uiZLno2rmBlJSafk
"
"_id": "
e8Ibi/wqdDtoXD7yQzcU2o
"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
4
"__id__": 2
3
},
"_enabled": true,
"_materials": [
...
...
@@ -1535,7 +1504,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "
a49296b4-0245-4b53-b2cf-d8679eb2f79a
"
"__uuid__": "
83d8cbfc-a72b-461e-ba23-ddd371a8d2a3
"
},
"_type": 0,
"_sizeMode": 0,
...
...
@@ -1549,19 +1518,19 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
5aw9RPVdREKKOUrkvYpWn8
"
"_id": "
daO4QVRLxF+ZArOSNn1QwW
"
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
4
"__id__": 2
3
},
"_enabled": true,
"_type": 1,
"_allowSleep": true,
"_gravityScale":
0
,
"_gravityScale":
1
,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
...
...
@@ -1574,20 +1543,90 @@
"enabledContactListener": true,
"bullet": false,
"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",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
4
"__id__": 2
3
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction":
0.2
,
"_friction":
1
,
"_restitution": 0,
"body": null,
"_offset": {
...
...
@@ -1598,156 +1637,177 @@
"points": [
{
"__type__": "cc.Vec2",
"x": -1
3.9
,
"y": -
14.2
"x": -1
0.1
,
"y": -
5.9
},
{
"__type__": "cc.Vec2",
"x": -
10
.9,
"y": -
17.9
"x": -
5
.9,
"y": -
9.1
},
{
"__type__": "cc.Vec2",
"x": -3.1,
"y": -11.7
"x": -9.1,
"y": -11
},
{
"__type__": "cc.Vec2",
"x": -2.2,
"y": -14.8
},
{
"__type__": "cc.Vec2",
"x": -2.7,
"y": -10.4
},
{
"__type__": "cc.Vec2",
"x": 2.5,
"y": -1
2.1
"y": -1
0.3
},
{
"__type__": "cc.Vec2",
"x":
8.5
,
"y": -1
7.2
"x":
2.3
,
"y": -1
4.4
},
{
"__type__": "cc.Vec2",
"x":
11.
9,
"y": -1
4.8
"x": 9,
"y": -1
1.3
},
{
"__type__": "cc.Vec2",
"x":
7.8
,
"y": -9.
7
"x":
6
,
"y": -9.
3
},
{
"__type__": "cc.Vec2",
"x": 10.
8
,
"y": -
5.
5
"x": 10.
06
,
"y": -
6.0
5
},
{
"__type__": "cc.Vec2",
"x": 1
9.8
,
"y": -
7.1
"x": 1
1.75
,
"y": -
8.6
},
{
"__type__": "cc.Vec2",
"x":
20.8
,
"y": -
2.
8
"x":
14.55
,
"y": -
1.4
8
},
{
"__type__": "cc.Vec2",
"x": 11.9,
"y":
0.
3
"x": 11.
6
9,
"y":
-2.2
3
},
{
"__type__": "cc.Vec2",
"x": 11.
2
,
"y":
4.3
"x": 11.
6
,
"y":
2.7
},
{
"__type__": "cc.Vec2",
"x": 1
8
,
"y":
10.7
"x": 1
4.4
,
"y":
2.2
},
{
"__type__": "cc.Vec2",
"x": 1
5
.8,
"y":
14.2
"x": 1
1
.8,
"y":
8.9
},
{
"__type__": "cc.Vec2",
"x":
7.9
,
"y":
9.3
"x":
10
,
"y":
6
},
{
"__type__": "cc.Vec2",
"x":
2.4
,
"y": 1
2.3
"x":
5.9
,
"y": 1
0.1
},
{
"__type__": "cc.Vec2",
"x":
1
.8,
"y": 1
8
.8
"x":
8
.8,
"y": 1
1
.8
},
{
"__type__": "cc.Vec2",
"x":
-2
,
"y": 1
8.8
"x":
2.29
,
"y": 1
4.73
},
{
"__type__": "cc.Vec2",
"x":
-3.4
,
"y": 1
2
.4
"x":
3
,
"y": 1
1
.4
},
{
"__type__": "cc.Vec2",
"x": -
8.2
,
"y": 1
0.1
"x": -
2.9
,
"y": 1
1.3
},
{
"__type__": "cc.Vec2",
"x": -
14.4
,
"y": 14.
4
"x": -
2
,
"y": 14.
8
},
{
"__type__": "cc.Vec2",
"x": -
16
.8,
"y": 1
1
"x": -
8
.8,
"y": 1
2
},
{
"__type__": "cc.Vec2",
"x": -
12.1
,
"y":
5.9
"x": -
5.9
,
"y":
10.2
},
{
"__type__": "cc.Vec2",
"x": -1
2.1
,
"y":
0.7
"x": -1
0.2
,
"y":
6.2
},
{
"__type__": "cc.Vec2",
"x": -
20.9
,
"y":
-0.1
"x": -
11.7
,
"y":
8.9
},
{
"__type__": "cc.Vec2",
"x": -
20.4
,
"y":
-4.3
"x": -
14.7
,
"y":
2.1
},
{
"__type__": "cc.Vec2",
"x": -11.
6
,
"y":
-4.6
"x": -11.
5
,
"y":
3
},
{
"__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
}
],
"_id": "
a8vVtofPNJ96eXNdHqBz3C
"
"_id": "
d1wXbPasBFx4C/okSXW1OQ
"
},
{
"__type__": "
554acE3G1pCNrN4/0aHxvon
",
"__type__": "
9f879YGuoROFrLJrd9nEcLA
",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
4
"__id__": 2
3
},
"_enabled": true,
"_id": "f1yMyd4RJEWYKqpqa+UGXO"
"target": null,
"_id": "50JHFGkF1ALI58dIjkQVsO"
},
{
"__type__": "cc.Node",
...
...
@@ -1783,8 +1843,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
30
,
"height":
100
"width":
111
,
"height":
649
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -1795,16 +1855,16 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-
257.597
,
-230.243
,
-
199.188
,
0
,
0,
0,
0,
0,
1,
5
,
5
,
5
1
,
1
,
1
]
},
"_eulerAngles": {
...
...
@@ -1818,7 +1878,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
63KGu4tbhMCoOTYBxnA55d
"
"_id": "
4c972fFCNEtJB37dlYOP9f
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1839,7 +1899,7 @@
"__uuid__": "7884c6b0-ce6a-438b-a8db-6755ad7552e7"
},
"_type": 0,
"_sizeMode":
0
,
"_sizeMode":
1
,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
...
...
@@ -1850,7 +1910,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
40CtcnNJVCE7HOc9hlShm5
"
"_id": "
94MJZyMOtNuasZJIubPN/d
"
},
{
"__type__": "cc.RigidBody",
...
...
@@ -1875,7 +1935,7 @@
"enabledContactListener": true,
"bullet": false,
"awakeOnLoad": true,
"_id": "
06rww2j4FHqoS/goE0ZQGq
"
"_id": "
f4pyloeoFLn6TqD4uwjpQy
"
},
{
"__type__": "cc.PhysicsBoxCollider",
...
...
@@ -1893,15 +1953,15 @@
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x":
1.5
,
"x":
0
,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width":
20
,
"height":
100
"width":
111
,
"height":
649
},
"_id": "
8bqNLX7ONBwIW7wgnZJo/Q
"
"_id": "
d4uA7n5KBNI6L0ksG0PQY0
"
},
{
"__type__": "0a49by9EpRC1KDzTww1GyH5",
...
...
@@ -1913,7 +1973,7 @@
"_enabled": true,
"label": null,
"text": "hello",
"_id": "
2cDPXaikdLd7Xu6zG3d32p
"
"_id": "
a87n4hhbRAuIbBkCN8SUGE
"
},
{
"__type__": "cc.Node",
...
...
@@ -1984,7 +2044,7 @@
"__id__": 153
}
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [],
"_prefab": null,
"_opacity": 255,
...
...
rescureMen/assets/script/gear.ts
View file @
166ff661
...
...
@@ -18,23 +18,18 @@ export default class NewClass extends cc.Component {
collider
:
cc
.
PhysicsPolygonCollider
;
startPoint
:
cc
.
Vec2
;
tween
:
any
;
points
:
cc
.
Vec2
;
// LIFE-CYCLE CALLBACKS:
onPreSolve
(
contact
,
selfCollider
,
otherCollider
)
{
// console.error(otherCollider.node.name);
// if (otherCollider && otherCollider.node.getComponent(cc.MotorJoint)) {
// // this.rigidBody.awake = false;
// 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);
// console.error(contact);
const
worldManifold
=
contact
.
getWorldManifold
();
this
.
points
=
worldManifold
.
normal
;
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
;
},
0
);
}
}
...
...
@@ -48,8 +43,6 @@ export default class NewClass extends cc.Component {
}
onEnable
()
{
clientEvent
.
on
(
'move'
,
this
.
move
,
this
);
clientEvent
.
on
(
'moveEnd'
,
this
.
moveEnd
,
this
);
}
initEvent
()
{
...
...
@@ -92,17 +85,11 @@ export default class NewClass extends cc.Component {
}
move
(
dir
)
{
console
.
error
(
'move'
);
this
.
tween
=
cc
.
tween
(
this
.
node
)
.
to
(
1
,
{
position
:
dir
})
.
start
()
// this.node.position = dir;
this
.
node
.
position
=
dir
;
// this.rigidBody.awake = true;
cc
.
director
.
getPhysicsManager
().
enabled
=
false
;
}
moveEnd
()
{
console
.
error
(
'moveEnd'
);
this
.
tween
.
stop
();
cc
.
director
.
getPhysicsManager
().
enabled
=
true
;
}
...
...
rescureMen/assets/script/hook.ts
View file @
166ff661
...
...
@@ -61,7 +61,6 @@ export default class NewClass extends cc.Component {
}
_touchMoveEvent
(
event
:
cc
.
Event
.
EventTouch
)
{
var
touches
=
event
.
getTouches
();
let
oldPos
=
this
.
node
.
parent
.
convertToNodeSpaceAR
(
touches
[
0
].
getStartLocation
());
let
newPos
=
this
.
node
.
parent
.
convertToNodeSpaceAR
(
touches
[
0
].
getLocation
());
// let subPos = oldPos.sub(newPos);
// let dir = cc.v3(this.nodePos.x - subPos.x, this.nodePos.y - subPos.y, 0);
...
...
rescureMen/assets/script/rope.ts
View file @
166ff661
...
...
@@ -32,7 +32,7 @@ export default class NewClass extends cc.Component {
// const motorJoint =this.node.getComponent(cc.MotorJoint);
// motorJoint.connectedBody = otherCollider.node;
// 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
)
{
this
.
rigidBody
.
linearVelocity
=
cc
.
v2
(
0
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment