Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg18_tianci
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
dg18_tianci
Commits
15b7a9c9
Commit
15b7a9c9
authored
Dec 18, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拖拽完成
parent
b90528b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
176 additions
and
182 deletions
+176
-182
dg28_drag.fire
assets/dg18_danci/scene/dg28_drag.fire
+142
-163
dg28_drag.ts
assets/dg18_danci/scene/dg28_drag.ts
+34
-19
No files found.
assets/dg18_danci/scene/dg28_drag.fire
View file @
15b7a9c9
...
@@ -84,43 +84,43 @@
...
@@ -84,43 +84,43 @@
"__id__": 48
"__id__": 48
},
},
{
{
"__id__":
50
"__id__":
49
},
},
{
{
"__id__": 5
1
"__id__": 5
0
},
},
{
{
"__id__": 5
3
"__id__": 5
2
},
},
{
{
"__id__": 5
5
"__id__": 5
4
},
},
{
{
"__id__": 6
3
"__id__": 6
2
},
},
{
{
"__id__": 8
1
"__id__": 8
0
},
},
{
{
"__id__": 8
6
"__id__": 8
5
},
},
{
{
"__id__": 9
1
"__id__": 9
0
},
},
{
{
"__id__": 9
9
"__id__": 9
8
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 11
5
"__id__": 11
4
},
},
{
{
"__id__": 11
6
"__id__": 11
5
},
},
{
{
"__id__": 11
7
"__id__": 11
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2204,18 +2204,14 @@
...
@@ -2204,18 +2204,14 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "layout_
debug
",
"_name": "layout_
target
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [],
{
"__id__": 49
}
],
"_prefab": null,
"_prefab": null,
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -2264,26 +2260,6 @@
...
@@ -2264,26 +2260,6 @@
"groupIndex": 0,
"groupIndex": 0,
"_id": "53AkpeA7ZKeKVrE/z2hzqS"
"_id": "53AkpeA7ZKeKVrE/z2hzqS"
},
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 0.1,
"_N$inverted": false,
"_id": "55rnbFEmdAiJuuNCU38KuQ"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "layout_items",
"_name": "layout_items",
...
@@ -2305,20 +2281,20 @@
...
@@ -2305,20 +2281,20 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 0,
"width":
122
0,
"height": 0
"height":
79
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y":
0.5
"y":
1
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
4.448
,
-610.496
,
12.336
,
419.052
,
0,
0,
0,
0,
0,
0,
...
@@ -2340,7 +2316,7 @@
...
@@ -2340,7 +2316,7 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
e1jCjaDd9Kxan+6NOgs4Rm
"
"_id": "
5biqDtRUxHRraeAzXFq0aw
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
...
@@ -2353,7 +2329,7 @@
...
@@ -2353,7 +2329,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 5
2
"__id__": 5
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2409,7 +2385,7 @@
...
@@ -2409,7 +2385,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
1
"__id__": 5
0
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -2442,7 +2418,7 @@
...
@@ -2442,7 +2418,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 5
4
"__id__": 5
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2498,7 +2474,7 @@
...
@@ -2498,7 +2474,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
3
"__id__": 5
2
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -2529,10 +2505,10 @@
...
@@ -2529,10 +2505,10 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 5
6
"__id__": 5
5
},
},
{
{
"__id__": 5
9
"__id__": 5
8
}
}
],
],
"_active": false,
"_active": false,
...
@@ -2590,11 +2566,11 @@
...
@@ -2590,11 +2566,11 @@
"_name": "bg",
"_name": "bg",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
5
"__id__": 5
4
},
},
"_children": [
"_children": [
{
{
"__id__": 5
7
"__id__": 5
6
}
}
],
],
"_active": true,
"_active": true,
...
@@ -2652,13 +2628,13 @@
...
@@ -2652,13 +2628,13 @@
"_name": "img_ battery001",
"_name": "img_ battery001",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
6
"__id__": 5
5
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 5
8
"__id__": 5
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2714,7 +2690,7 @@
...
@@ -2714,7 +2690,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
7
"__id__": 5
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2746,17 +2722,17 @@
...
@@ -2746,17 +2722,17 @@
"_name": "item_img",
"_name": "item_img",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
5
"__id__": 5
4
},
},
"_children": [
"_children": [
{
{
"__id__":
60
"__id__":
59
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 6
2
"__id__": 6
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2812,13 +2788,13 @@
...
@@ -2812,13 +2788,13 @@
"_name": "img",
"_name": "img",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
9
"__id__": 5
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 6
1
"__id__": 6
0
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2874,7 +2850,7 @@
...
@@ -2874,7 +2850,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
60
"__id__":
59
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2906,7 +2882,7 @@
...
@@ -2906,7 +2882,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
9
"__id__": 5
8
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -2978,10 +2954,10 @@
...
@@ -2978,10 +2954,10 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 6
4
"__id__": 6
3
},
},
{
{
"__id__": 7
7
"__id__": 7
6
}
}
],
],
"_active": false,
"_active": false,
...
@@ -3039,26 +3015,26 @@
...
@@ -3039,26 +3015,26 @@
"_name": "bg",
"_name": "bg",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
3
"__id__": 6
2
},
},
"_children": [
"_children": [
{
{
"__id__": 6
5
"__id__": 6
4
},
},
{
{
"__id__": 6
7
"__id__": 6
6
},
},
{
{
"__id__": 6
9
"__id__": 6
8
},
},
{
{
"__id__": 7
1
"__id__": 7
0
},
},
{
{
"__id__": 7
3
"__id__": 7
2
},
},
{
{
"__id__": 7
5
"__id__": 7
4
}
}
],
],
"_active": true,
"_active": true,
...
@@ -3116,13 +3092,13 @@
...
@@ -3116,13 +3092,13 @@
"_name": "img_battery6",
"_name": "img_battery6",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
4
"__id__": 6
3
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 6
6
"__id__": 6
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3178,7 +3154,7 @@
...
@@ -3178,7 +3154,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
5
"__id__": 6
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3210,13 +3186,13 @@
...
@@ -3210,13 +3186,13 @@
"_name": "img_battery4",
"_name": "img_battery4",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
4
"__id__": 6
3
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 6
8
"__id__": 6
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3272,7 +3248,7 @@
...
@@ -3272,7 +3248,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
7
"__id__": 6
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3304,13 +3280,13 @@
...
@@ -3304,13 +3280,13 @@
"_name": "img_battery5",
"_name": "img_battery5",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
4
"__id__": 6
3
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
70
"__id__":
69
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3366,7 +3342,7 @@
...
@@ -3366,7 +3342,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
9
"__id__": 6
8
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3398,13 +3374,13 @@
...
@@ -3398,13 +3374,13 @@
"_name": "img_battery3",
"_name": "img_battery3",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
4
"__id__": 6
3
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 7
2
"__id__": 7
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3460,7 +3436,7 @@
...
@@ -3460,7 +3436,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
1
"__id__": 7
0
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3492,13 +3468,13 @@
...
@@ -3492,13 +3468,13 @@
"_name": "img_battery2",
"_name": "img_battery2",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
4
"__id__": 6
3
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 7
4
"__id__": 7
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3554,7 +3530,7 @@
...
@@ -3554,7 +3530,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
3
"__id__": 7
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3586,13 +3562,13 @@
...
@@ -3586,13 +3562,13 @@
"_name": "img_battery1",
"_name": "img_battery1",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
4
"__id__": 6
3
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 7
6
"__id__": 7
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3648,7 +3624,7 @@
...
@@ -3648,7 +3624,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
5
"__id__": 7
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3680,17 +3656,17 @@
...
@@ -3680,17 +3656,17 @@
"_name": "item_text",
"_name": "item_text",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 6
3
"__id__": 6
2
},
},
"_children": [
"_children": [
{
{
"__id__": 7
8
"__id__": 7
7
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
80
"__id__":
79
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3746,13 +3722,13 @@
...
@@ -3746,13 +3722,13 @@
"_name": "text",
"_name": "text",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 7
7
"__id__": 7
6
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 7
9
"__id__": 7
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3808,7 +3784,7 @@
...
@@ -3808,7 +3784,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
8
"__id__": 7
7
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3841,7 +3817,7 @@
...
@@ -3841,7 +3817,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
7
"__id__": 7
6
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -3913,10 +3889,10 @@
...
@@ -3913,10 +3889,10 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 8
2
"__id__": 8
1
},
},
{
{
"__id__": 8
4
"__id__": 8
3
}
}
],
],
"_active": false,
"_active": false,
...
@@ -3974,13 +3950,13 @@
...
@@ -3974,13 +3950,13 @@
"_name": "img_left_1",
"_name": "img_left_1",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 8
1
"__id__": 8
0
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
3
"__id__": 8
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4036,7 +4012,7 @@
...
@@ -4036,7 +4012,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
2
"__id__": 8
1
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4068,13 +4044,13 @@
...
@@ -4068,13 +4044,13 @@
"_name": "img_left_2",
"_name": "img_left_2",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 8
1
"__id__": 8
0
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
5
"__id__": 8
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4130,7 +4106,7 @@
...
@@ -4130,7 +4106,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
4
"__id__": 8
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4166,10 +4142,10 @@
...
@@ -4166,10 +4142,10 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 8
7
"__id__": 8
6
},
},
{
{
"__id__": 8
9
"__id__": 8
8
}
}
],
],
"_active": false,
"_active": false,
...
@@ -4227,13 +4203,13 @@
...
@@ -4227,13 +4203,13 @@
"_name": "img_right_1",
"_name": "img_right_1",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 8
6
"__id__": 8
5
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
8
"__id__": 8
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4289,7 +4265,7 @@
...
@@ -4289,7 +4265,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
7
"__id__": 8
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4321,13 +4297,13 @@
...
@@ -4321,13 +4297,13 @@
"_name": "img_right_2",
"_name": "img_right_2",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 8
6
"__id__": 8
5
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
90
"__id__":
89
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4383,7 +4359,7 @@
...
@@ -4383,7 +4359,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
9
"__id__": 8
8
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4419,16 +4395,16 @@
...
@@ -4419,16 +4395,16 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 9
2
"__id__": 9
1
},
},
{
{
"__id__": 9
4
"__id__": 9
3
}
}
],
],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 9
8
"__id__": 9
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4484,13 +4460,13 @@
...
@@ -4484,13 +4460,13 @@
"_name": "ani",
"_name": "ani",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 9
1
"__id__": 9
0
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 9
3
"__id__": 9
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4546,7 +4522,7 @@
...
@@ -4546,7 +4522,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 9
2
"__id__": 9
1
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4586,17 +4562,17 @@
...
@@ -4586,17 +4562,17 @@
"_name": "btn_go",
"_name": "btn_go",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 9
1
"__id__": 9
0
},
},
"_children": [
"_children": [
{
{
"__id__": 9
5
"__id__": 9
4
}
}
],
],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 9
7
"__id__": 9
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4652,13 +4628,13 @@
...
@@ -4652,13 +4628,13 @@
"_name": "text",
"_name": "text",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 9
4
"__id__": 9
3
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 9
6
"__id__": 9
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4714,7 +4690,7 @@
...
@@ -4714,7 +4690,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 9
5
"__id__": 9
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4747,7 +4723,7 @@
...
@@ -4747,7 +4723,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 9
4
"__id__": 9
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4779,11 +4755,11 @@
...
@@ -4779,11 +4755,11 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 9
1
"__id__": 9
0
},
},
"_enabled": true,
"_enabled": true,
"aniRole": {
"aniRole": {
"__id__": 9
2
"__id__": 9
1
},
},
"moveX": 500,
"moveX": 500,
"_id": "e4RrOXSNJGd68Mq3UTYY0p"
"_id": "e4RrOXSNJGd68Mq3UTYY0p"
...
@@ -4797,13 +4773,13 @@
...
@@ -4797,13 +4773,13 @@
},
},
"_children": [
"_children": [
{
{
"__id__":
100
"__id__":
99
},
},
{
{
"__id__": 10
3
"__id__": 10
2
},
},
{
{
"__id__": 10
4
"__id__": 10
3
}
}
],
],
"_active": true,
"_active": true,
...
@@ -4861,11 +4837,11 @@
...
@@ -4861,11 +4837,11 @@
"_name": "font",
"_name": "font",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 9
9
"__id__": 9
8
},
},
"_children": [
"_children": [
{
{
"__id__": 10
1
"__id__": 10
0
}
}
],
],
"_active": true,
"_active": true,
...
@@ -4923,13 +4899,13 @@
...
@@ -4923,13 +4899,13 @@
"_name": "BRLNSDB",
"_name": "BRLNSDB",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
100
"__id__":
99
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 10
2
"__id__": 10
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4985,7 +4961,7 @@
...
@@ -4985,7 +4961,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 10
1
"__id__": 10
0
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -5020,7 +4996,7 @@
...
@@ -5020,7 +4996,7 @@
"_name": "img",
"_name": "img",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 9
9
"__id__": 9
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
...
@@ -5078,23 +5054,23 @@
...
@@ -5078,23 +5054,23 @@
"_name": "audio",
"_name": "audio",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 9
9
"__id__": 9
8
},
},
"_children": [
"_children": [
{
{
"__id__": 10
5
"__id__": 10
4
},
},
{
{
"__id__": 10
7
"__id__": 10
6
},
},
{
{
"__id__": 10
9
"__id__": 10
8
},
},
{
{
"__id__": 11
1
"__id__": 11
0
},
},
{
{
"__id__": 11
3
"__id__": 11
2
}
}
],
],
"_active": true,
"_active": true,
...
@@ -5152,13 +5128,13 @@
...
@@ -5152,13 +5128,13 @@
"_name": "btn",
"_name": "btn",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 10
4
"__id__": 10
3
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 10
6
"__id__": 10
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5214,7 +5190,7 @@
...
@@ -5214,7 +5190,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 10
5
"__id__": 10
4
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -5233,13 +5209,13 @@
...
@@ -5233,13 +5209,13 @@
"_name": "dragdown",
"_name": "dragdown",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 10
4
"__id__": 10
3
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 10
8
"__id__": 10
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5295,7 +5271,7 @@
...
@@ -5295,7 +5271,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 10
7
"__id__": 10
6
},
},
"_enabled": true,
"_enabled": true,
"_clip": null,
"_clip": null,
...
@@ -5312,13 +5288,13 @@
...
@@ -5312,13 +5288,13 @@
"_name": "nextgame",
"_name": "nextgame",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 10
4
"__id__": 10
3
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
10
"__id__": 1
09
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5374,7 +5350,7 @@
...
@@ -5374,7 +5350,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 10
9
"__id__": 10
8
},
},
"_enabled": true,
"_enabled": true,
"_clip": null,
"_clip": null,
...
@@ -5391,13 +5367,13 @@
...
@@ -5391,13 +5367,13 @@
"_name": "boom",
"_name": "boom",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 10
4
"__id__": 10
3
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 11
2
"__id__": 11
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5453,7 +5429,7 @@
...
@@ -5453,7 +5429,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 11
1
"__id__": 11
0
},
},
"_enabled": true,
"_enabled": true,
"_clip": null,
"_clip": null,
...
@@ -5470,13 +5446,13 @@
...
@@ -5470,13 +5446,13 @@
"_name": "pie_drop",
"_name": "pie_drop",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 10
4
"__id__": 10
3
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 11
4
"__id__": 11
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5532,7 +5508,7 @@
...
@@ -5532,7 +5508,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 11
3
"__id__": 11
2
},
},
"_enabled": true,
"_enabled": true,
"_clip": null,
"_clip": null,
...
@@ -5600,19 +5576,22 @@
...
@@ -5600,19 +5576,22 @@
"__id__": 34
"__id__": 34
},
},
"layout_items": {
"layout_items": {
"__id__": 50
"__id__": 49
},
"layout_target": {
"__id__": 48
},
},
"layout_battery_left": {
"layout_battery_left": {
"__id__": 5
1
"__id__": 5
0
},
},
"layout_battery_right": {
"layout_battery_right": {
"__id__": 5
3
"__id__": 5
2
},
},
"item_battery_text": {
"item_battery_text": {
"__id__": 6
3
"__id__": 6
2
},
},
"item_battery_img": {
"item_battery_img": {
"__id__": 5
5
"__id__": 5
4
},
},
"_id": "5b78aJTZFGI79ubV+y7E/s"
"_id": "5b78aJTZFGI79ubV+y7E/s"
}
}
...
...
assets/dg18_danci/scene/dg28_drag.ts
View file @
15b7a9c9
...
@@ -70,6 +70,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -70,6 +70,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
@
property
(
cc
.
Node
)
layout_canvas
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
layout_canvas
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
layout_items
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
layout_items
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
layout_target
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
layout_battery_left
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
layout_battery_left
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
layout_battery_right
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
layout_battery_right
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
item_battery_text
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
item_battery_text
:
cc
.
Node
=
null
;
...
@@ -78,10 +79,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -78,10 +79,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
img
=
pg
.
view
.
find
(
this
.
layout_canvas
,
'
img
'
);
let
img
=
pg
.
view
.
find
(
this
.
layout_canvas
,
'
img
'
);
pg
.
view
.
setNetImg
(
img
,
this
.
currentQuestion
.
bgItem
.
url
,
{
w
:
1220
,
h
:
790
},
false
)
pg
.
view
.
setNetImg
(
img
,
this
.
currentQuestion
.
bgItem
.
url
,
{
w
:
1220
,
h
:
790
},
false
)
this
.
init
Debug
();
this
.
init
Targets
();
}
}
initDebug
()
{
initTargets
()
{
let
layout_debug
=
pg
.
view
.
find
(
this
,
'
layout_debug
'
);
let
item_color
=
pg
.
view
.
find
(
this
,
'
item_color
'
);
let
item_color
=
pg
.
view
.
find
(
this
,
'
item_color
'
);
let
arr
=
this
.
changepoints
(
this
.
currentQuestion
);
let
arr
=
this
.
changepoints
(
this
.
currentQuestion
);
arr
.
forEach
((
ar
)
=>
{
arr
.
forEach
((
ar
)
=>
{
...
@@ -89,8 +89,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -89,8 +89,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
node
.
x
=
ar
.
pos
.
x
;
node
.
x
=
ar
.
pos
.
x
;
node
.
y
=
ar
.
pos
.
y
;
node
.
y
=
ar
.
pos
.
y
;
node
.
data
=
ar
;
node
.
data
=
ar
;
//
node.removeComponent(cc.Sprite);
node
.
removeComponent
(
cc
.
Sprite
);
layout_debug
.
addChild
(
node
)
this
.
layout_target
.
addChild
(
node
)
console
.
log
(
node
.
x
,
node
.
y
)
console
.
log
(
node
.
x
,
node
.
y
)
})
})
}
}
...
@@ -188,11 +188,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -188,11 +188,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
else
{
}
else
{
// 未碰撞到
// 未碰撞到
// 判定碰撞坐标和区域
// 判定碰撞坐标和区域
let
target
=
this
.
checkSuccess
(
node
)
let
target
Data
=
this
.
checkSuccess
(
node
)
if
(
!
target
)
{
if
(
!
target
Data
)
{
this
.
onMeetFail
(
node
);
this
.
onMeetFail
(
node
);
}
else
{
}
else
{
this
.
onMeetSuccess
(
node
);
if
(
node
.
data
.
index
!=
targetData
.
index
)
{
this
.
onMeetFail
(
node
);
}
else
{
this
.
onMeetSuccess
(
node
,
targetData
);
}
}
}
}
}
}
}
...
@@ -202,16 +206,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -202,16 +206,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
question
=
this
.
currentQuestion
let
question
=
this
.
currentQuestion
let
arr
=
this
.
changepoints
(
question
)
let
arr
=
this
.
changepoints
(
question
)
// 左上角坐标
// 左上角坐标
// let items =
let
targetData
=
null
;
let
minDis
=
999999
;
return
arr
.
find
(
ar
=>
{
let
items
=
this
.
layout_target
.
children
;
let
dis
=
this
.
getDistances
(
cc
.
v2
(
ar
.
pos
),
node
);
items
.
forEach
((
item
,
i
)
=>
{
if
(
dis
<
100
)
{
let
data
=
item
.
data
;
return
true
let
dis
=
this
.
getDistances
(
item
,
node
);
}
else
{
if
(
dis
<
100
&&
dis
<
minDis
)
{
return
false
minDis
=
dis
;
targetData
=
data
;
}
}
});
})
return
targetData
}
}
private
changepoints
(
data
)
{
private
changepoints
(
data
)
{
...
@@ -232,11 +238,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -232,11 +238,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
onMeetSuccess
(
node
)
{
onMeetSuccess
(
node
,
targetData
)
{
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
,
this
.
onTouchMove
,
this
);
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
,
this
.
onTouchMove
,
this
);
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onTouchEnd
,
this
);
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onTouchEnd
,
this
);
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_CANCEL
,
this
.
onTouchEnd
,
this
);
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_CANCEL
,
this
.
onTouchEnd
,
this
);
node
.
x
=
targetData
.
pos
.
x
;
node
.
y
=
targetData
.
pos
.
y
;
node
.
parent
=
this
.
layout_items
// 处理完成就结束了
}
}
onMeetFail
(
node
)
{
onMeetFail
(
node
)
{
node
.
x
=
node
.
cPos
.
x
;
node
.
x
=
node
.
cPos
.
x
;
...
@@ -252,10 +264,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -252,10 +264,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
private
getDistances
(
p1
,
p
2
)
{
private
getDistances
(
node1
,
node
2
)
{
//转换世界坐标查看距离
//转换世界坐标查看距离
let
p1
=
node1
.
convertToWorldSpaceAR
(
cc
.
v2
(
0
,
0
));
let
p2
=
node2
.
convertToWorldSpaceAR
(
cc
.
v2
(
0
,
0
));
let
temp
=
p1
.
sub
(
p2
);
let
temp
=
p1
.
sub
(
p2
);
let
dis
=
Math
.
abs
(
temp
.
mag
());
let
dis
=
Math
.
abs
(
temp
.
mag
());
console
.
log
(
`
${
p1
.
x
}
,
${
p1
.
y
}
`
,
`
${
p2
.
x
}
,
${
p2
.
y
}
`
,
dis
);
return
dis
;
return
dis
;
}
}
private
rectCollect
(
A
,
B
)
{
private
rectCollect
(
A
,
B
)
{
...
...
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