Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ngt14_czm
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
ngt14_czm
Commits
c31b11a3
Commit
c31b11a3
authored
Oct 27, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理数据
parent
93babd5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1035 additions
and
192 deletions
+1035
-192
cocos_generator.fire
assets/cocos_generator/scene/cocos_generator.fire
+938
-190
cocos_generator.ts
assets/cocos_generator/scene/cocos_generator.ts
+96
-1
pg.ts
assets/cocos_generator/scene/tool/pg.ts
+1
-1
No files found.
assets/cocos_generator/scene/cocos_generator.fire
View file @
c31b11a3
...
@@ -84,28 +84,28 @@
...
@@ -84,28 +84,28 @@
"__id__": 27
"__id__": 27
},
},
{
{
"__id__":
28
"__id__":
43
},
},
{
{
"__id__":
37
"__id__":
52
},
},
{
{
"__id__":
39
"__id__":
54
},
},
{
{
"__id__":
53
"__id__":
68
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
54
"__id__":
69
},
},
{
{
"__id__":
55
"__id__":
70
},
},
{
{
"__id__":
56
"__id__":
71
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -780,7 +780,7 @@
...
@@ -780,7 +780,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
"_components": [
{
{
"__id__": 16
"__id__": 16
...
@@ -1314,7 +1314,14 @@
...
@@ -1314,7 +1314,14 @@
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [
{
"__id__": 28
},
{
"__id__": 41
}
],
"_active": true,
"_active": true,
"_components": [],
"_components": [],
"_prefab": null,
"_prefab": null,
...
@@ -1367,10 +1374,10 @@
...
@@ -1367,10 +1374,10 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "b
lock
",
"_name": "b
ase
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
7
},
},
"_children": [
"_children": [
{
{
...
@@ -1384,6 +1391,12 @@
...
@@ -1384,6 +1391,12 @@
},
},
{
{
"__id__": 35
"__id__": 35
},
{
"__id__": 37
},
{
"__id__": 39
}
}
],
],
"_active": true,
"_active": true,
...
@@ -1399,8 +1412,8 @@
...
@@ -1399,8 +1412,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
8
0,
"width": 0,
"height":
8
0
"height": 0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1411,8 +1424,8 @@
...
@@ -1411,8 +1424,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-676.319
,
0
,
1274.723
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -1434,17 +1447,17 @@
...
@@ -1434,17 +1447,17 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
00h3m2hmJADoL9HVkPmt0G
"
"_id": "
b76b+O6ENDDa+ruw2RLoFi
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
New Sprite(Splash)
",
"_name": "
img_big
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 28
"__id__": 28
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 30
"__id__": 30
...
@@ -1454,15 +1467,15 @@
...
@@ -1454,15 +1467,15 @@
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 2
22
,
"r": 2
55
,
"g": 2
11
,
"g": 2
55
,
"b": 2
11
,
"b": 2
55
,
"a": 255
"a": 255
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
80
,
"width":
344
,
"height":
80
"height":
244
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1473,8 +1486,8 @@
...
@@ -1473,8 +1486,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
4.341
,
-0.368
,
-1.889
,
8.496
,
0,
0,
0,
0,
0,
0,
...
@@ -1496,7 +1509,7 @@
...
@@ -1496,7 +1509,7 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
72hhHPTf1K/L6AI0BtFZbx
"
"_id": "
92wGAbH0VKJZ1Ph3PzTIe3
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
...
@@ -1514,7 +1527,7 @@
...
@@ -1514,7 +1527,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
a23235d1-15db-4b95-8439-a2e005bfff9
1"
"__uuid__": "
8cdb44ac-a3f6-449f-b354-7cd48cf8406
1"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 0,
"_sizeMode": 0,
...
@@ -1528,17 +1541,17 @@
...
@@ -1528,17 +1541,17 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
dalq52ff9LvJsuj59b01sm
"
"_id": "
a2+yBgUTtKp6viTs2mOEnA
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "img_
undone
",
"_name": "img_
small
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 28
"__id__": 28
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 32
"__id__": 32
...
@@ -1555,8 +1568,8 @@
...
@@ -1555,8 +1568,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
79
,
"width":
264
,
"height":
79
"height":
186
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1567,8 +1580,8 @@
...
@@ -1567,8 +1580,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
1.551
,
4.632
,
1
.59
,
1
03.496
,
0,
0,
0,
0,
0,
0,
...
@@ -1590,7 +1603,7 @@
...
@@ -1590,7 +1603,7 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
cf6AeLIhlFSJVtdmBmqHYc
"
"_id": "
d8HTPrZhBBVZeDpJmvNwWL
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
...
@@ -1608,10 +1621,10 @@
...
@@ -1608,10 +1621,10 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
7601ec7c-8dbc-45eb-8c16-9b4ae3a441e5
"
"__uuid__": "
8cdb44ac-a3f6-449f-b354-7cd48cf84061
"
},
},
"_type": 0,
"_type": 0,
"_sizeMode":
1
,
"_sizeMode":
0
,
"_fillType": 0,
"_fillType": 0,
"_fillCenter": {
"_fillCenter": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1622,17 +1635,17 @@
...
@@ -1622,17 +1635,17 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
8dzFwAYi5H7qoHzSpTofvj
"
"_id": "
769/elLg5JPo5ctHtHyEp4
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
img_focus
",
"_name": "
label_big
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 28
"__id__": 28
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 34
"__id__": 34
...
@@ -1649,20 +1662,20 @@
...
@@ -1649,20 +1662,20 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
82
,
"width":
710
,
"height":
83
"height":
126.55999999999999
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
"y": 0.5
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
3.532
,
-351.476
,
0.136
,
-1.851
,
0,
0,
0,
0,
0,
0,
...
@@ -1684,10 +1697,10 @@
...
@@ -1684,10 +1697,10 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
72OEwS0MBBw6RD37Ah5ooa
"
"_id": "
5aktThkIVLT6Y+DiThBVDO
"
},
},
{
{
"__type__": "cc.
Sprite
",
"__type__": "cc.
Label
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
...
@@ -1701,26 +1714,29 @@
...
@@ -1701,26 +1714,29 @@
],
],
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_string": "A:______do you go to the park?",
"__uuid__": "8761f126-e248-45c9-adbd-7c779f0bb24a"
"_N$string": "A:______do you go to the park?",
},
"_fontSize": 56,
"_type": 0,
"_lineHeight": 56,
"_sizeMode": 1,
"_enableWrapText": true,
"_fillType": 0,
"_N$file": {
"_fillCenter": {
"__uuid__": "6d6846ac-918f-46f0-aff7-53ca2e2734ef"
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
},
"_fillStart": 0,
"_isSystemFontUsed": false,
"_fillRange": 0,
"_spacingX": 0,
"_isTrimmedMode": true,
"_batchAsBitmap": false,
"_atlas": null,
"_styleFlags": 0,
"_id": "cfyB+TEj5C0rKYNP4msUgn"
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 3,
"_N$cacheMode": 0,
"_id": "f2tOI/JNJEErr0kOddzhyz"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
img_focus2
",
"_name": "
label_small
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 28
"__id__": 28
...
@@ -1743,20 +1759,20 @@
...
@@ -1743,20 +1759,20 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
82
,
"width":
714.1
,
"height":
83
"height":
60.48
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
"y": 0.5
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0
,
-344.947
,
0
,
-53.531
,
0,
0,
0,
0,
0,
0,
...
@@ -1778,10 +1794,10 @@
...
@@ -1778,10 +1794,10 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
a8ZCdshfpMZriL11LH8Kr
K"
"_id": "
d3CBwUW8ZGS7QmkoxAJUJ
K"
},
},
{
{
"__type__": "cc.
Sprite
",
"__type__": "cc.
Label
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
...
@@ -1795,29 +1811,32 @@
...
@@ -1795,29 +1811,32 @@
],
],
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_string": "A:______do you go to the park?",
"__uuid__": "4738d102-7b1b-4d92-9942-9ddc9e5edab8"
"_N$string": "A:______do you go to the park?",
},
"_fontSize": 48,
"_type": 0,
"_lineHeight": 48,
"_sizeMode": 1,
"_enableWrapText": true,
"_fillType": 0,
"_N$file": {
"_fillCenter": {
"__uuid__": "6d6846ac-918f-46f0-aff7-53ca2e2734ef"
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
},
"_fillStart": 0,
"_isSystemFontUsed": false,
"_fillRange": 0,
"_spacingX": 0,
"_isTrimmedMode": true,
"_batchAsBitmap": false,
"_atlas": null,
"_styleFlags": 0,
"_id": "d3t9BYmZtDX5ZRYdEjEeyQ"
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "10mJwh8t1PXp0To38RtX35"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "layout_
blocks
",
"_name": "layout_
double
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
...
@@ -1837,8 +1856,8 @@
...
@@ -1837,8 +1856,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
107
0,
"width":
71
0,
"height":
81
0
"height":
18
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1849,8 +1868,8 @@
...
@@ -1849,8 +1868,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-377.20799999999997
,
0
,
-69.72399999999999
,
105.42
,
0,
0,
0,
0,
0,
0,
...
@@ -1872,66 +1891,52 @@
...
@@ -1872,66 +1891,52 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
75av9U76xJsLS7Q9X5OHMG
"
"_id": "
eaIDzdRGxC0KMXCTu3xwbD
"
},
},
{
{
"__type__": "cc.
Widge
t",
"__type__": "cc.
Layou
t",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 37
"__id__": 37
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"_layoutSize": {
"_target": null,
"__type__": "cc.Size",
"_alignFlags": 12,
"width": 300,
"_left": 47.79200000000003,
"height": 200
"_right": 0,
},
"_top": 0,
"_resize": 0,
"_bottom": 65.27600000000002,
"_N$layoutType": 1,
"_verticalCenter": 0,
"_N$cellSize": {
"_horizontalCenter": 0,
"__type__": "cc.Size",
"_isAbsLeft": true,
"width": 40,
"_isAbsRight": true,
"height": 40
"_isAbsTop": true,
},
"_isAbsBottom": true,
"_N$startAxis": 0,
"_isAbsHorizontalCenter": true,
"_N$paddingLeft": 0,
"_isAbsVerticalCenter": true,
"_N$paddingRight": 0,
"_originalWidth": 0,
"_N$paddingTop": 0,
"_originalHeight": 0,
"_N$paddingBottom": 0,
"_id": "2eff7tjBlDJ7D7iQfB9p1/"
"_N$spacingX": 0,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "d0hGysL6hAcI+ZE9pequ5q"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
word
",
"_name": "
layout_single
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
8
},
},
"_children": [
"_children": [],
{
"__id__": 40
},
{
"__id__": 42
},
{
"__id__": 44
},
{
"__id__": 46
},
{
"__id__": 48
},
{
"__id__": 50
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
52
"__id__":
40
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1945,8 +1950,8 @@
...
@@ -1945,8 +1950,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
1
10,
"width":
7
10,
"height":
11
0
"height":
9
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1957,13 +1962,13 @@
...
@@ -1957,13 +1962,13 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-410.844,
0,
1311.419,
105.42,
0,
0,
0,
0,
0,
0,
0,
0.026176948307873153,
1,
0.9996573249755573,
1,
1,
1,
1,
1
1
...
@@ -1973,27 +1978,59 @@
...
@@ -1973,27 +1978,59 @@
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 0,
"x": 0,
"y": 0,
"y": 0,
"z":
3
"z":
0
},
},
"_skewX": 0,
"_skewX": 0,
"_skewY": 0,
"_skewY": 0,
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "f1SOLVKY9P47AT5XSSGy94"
"_id": "cfoW7RsWlN2KnZvwEvFTQz"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 710,
"height": 90
},
"_resize": 0,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 0,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "90rNf33aVK1oK4MbgrjHHi"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
img_keyboard_1
",
"_name": "
layout
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
39
"__id__":
27
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 4
1
"__id__": 4
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2007,8 +2044,8 @@
...
@@ -2007,8 +2044,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
109
,
"width":
710
,
"height":
11
0
"height":
40
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -2042,52 +2079,763 @@
...
@@ -2042,52 +2079,763 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
e68W82JBFMkoRyJJOVDsIV
"
"_id": "
af7uWqgjRPlYdfymvp5VJ1
"
},
},
{
{
"__type__": "cc.
Sprite
",
"__type__": "cc.
Layout
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 4
0
"__id__": 4
1
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_layoutSize": {
{
"__type__": "cc.Size",
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"width": 300,
}
"height": 200
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "3bb3cbb5-93b6-43ee-8cf7-dc69c44cc875"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
},
"_fillStart": 0,
"_resize": 0,
"_fillRange": 0,
"_N$layoutType": 2,
"_isTrimmedMode": true,
"_N$cellSize": {
"_atlas": null,
"__type__": "cc.Size",
"_id": "8fx5y+3ydOB6gYWT67WKM2"
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 0,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "b5bt4tM/ZHirLJgch2RT8p"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "img_keyboard_2",
"_name": "block",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 44
},
{
"__id__": 46
},
{
"__id__": 48
},
{
"__id__": 50
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-676.319,
1274.723,
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": "00h3m2hmJADoL9HVkPmt0G"
},
{
"__type__": "cc.Node",
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 43
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 222,
"g": 211,
"b": 211,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
4.341,
-1.889,
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": "72hhHPTf1K/L6AI0BtFZbx"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
},
"_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": "dalq52ff9LvJsuj59b01sm"
},
{
"__type__": "cc.Node",
"_name": "img_undone",
"_objFlags": 0,
"_parent": {
"__id__": 43
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 47
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 79,
"height": 79
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1.551,
1.59,
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": "cf6AeLIhlFSJVtdmBmqHYc"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 46
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7601ec7c-8dbc-45eb-8c16-9b4ae3a441e5"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "8dzFwAYi5H7qoHzSpTofvj"
},
{
"__type__": "cc.Node",
"_name": "img_focus",
"_objFlags": 0,
"_parent": {
"__id__": 43
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 49
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 82,
"height": 83
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
3.532,
0.136,
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": "72OEwS0MBBw6RD37Ah5ooa"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8761f126-e248-45c9-adbd-7c779f0bb24a"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "cfyB+TEj5C0rKYNP4msUgn"
},
{
"__type__": "cc.Node",
"_name": "img_focus2",
"_objFlags": 0,
"_parent": {
"__id__": 43
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 51
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 82,
"height": 83
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
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": "a8ZCdshfpMZriL11LH8KrK"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4738d102-7b1b-4d92-9942-9ddc9e5edab8"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "d3t9BYmZtDX5ZRYdEjEeyQ"
},
{
"__type__": "cc.Node",
"_name": "layout_blocks",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 53
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1070,
"height": 810
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-377.20799999999997,
-69.72399999999999,
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": "75av9U76xJsLS7Q9X5OHMG"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 52
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 12,
"_left": 47.79200000000003,
"_right": 0,
"_top": 0,
"_bottom": 65.27600000000002,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "2eff7tjBlDJ7D7iQfB9p1/"
},
{
"__type__": "cc.Node",
"_name": "word",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 39
"__id__": 2
},
"_children": [
{
"__id__": 55
},
{
"__id__": 57
},
{
"__id__": 59
},
{
"__id__": 61
},
{
"__id__": 63
},
{
"__id__": 65
}
],
"_active": true,
"_components": [
{
"__id__": 67
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 110,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-410.844,
1311.419,
0,
0,
0,
0.026176948307873153,
0.9996573249755573,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 3
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "f1SOLVKY9P47AT5XSSGy94"
},
{
"__type__": "cc.Node",
"_name": "img_keyboard_1",
"_objFlags": 0,
"_parent": {
"__id__": 54
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 109,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
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": "e68W82JBFMkoRyJJOVDsIV"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "3bb3cbb5-93b6-43ee-8cf7-dc69c44cc875"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "8fx5y+3ydOB6gYWT67WKM2"
},
{
"__type__": "cc.Node",
"_name": "img_keyboard_2",
"_objFlags": 0,
"_parent": {
"__id__": 54
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
43
"__id__":
58
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2143,7 +2891,7 @@
...
@@ -2143,7 +2891,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
42
"__id__":
57
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2175,13 +2923,13 @@
...
@@ -2175,13 +2923,13 @@
"_name": "img_keyboard_3",
"_name": "img_keyboard_3",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
39
"__id__":
54
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
45
"__id__":
60
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2237,7 +2985,7 @@
...
@@ -2237,7 +2985,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
44
"__id__":
59
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2269,13 +3017,13 @@
...
@@ -2269,13 +3017,13 @@
"_name": "img_keyboard_4",
"_name": "img_keyboard_4",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
39
"__id__":
54
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
47
"__id__":
62
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2331,7 +3079,7 @@
...
@@ -2331,7 +3079,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
46
"__id__":
61
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2363,13 +3111,13 @@
...
@@ -2363,13 +3111,13 @@
"_name": "img_keyboard_5",
"_name": "img_keyboard_5",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
39
"__id__":
54
},
},
"_children": [],
"_children": [],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
49
"__id__":
64
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2425,7 +3173,7 @@
...
@@ -2425,7 +3173,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
48
"__id__":
63
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2457,13 +3205,13 @@
...
@@ -2457,13 +3205,13 @@
"_name": "label",
"_name": "label",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
39
"__id__":
54
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
51
"__id__":
66
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2519,7 +3267,7 @@
...
@@ -2519,7 +3267,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
50
"__id__":
65
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2554,7 +3302,7 @@
...
@@ -2554,7 +3302,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
39
"__id__":
54
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -2615,7 +3363,7 @@
...
@@ -2615,7 +3363,7 @@
"hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"_N$target": {
"__id__":
39
"__id__":
54
},
},
"_id": "a5CSFc15pHJrUqBqHzlHYf"
"_id": "a5CSFc15pHJrUqBqHzlHYf"
},
},
...
...
assets/cocos_generator/scene/cocos_generator.ts
View file @
c31b11a3
import
{
asyncDelay
,
onHomeworkFinish
}
from
"
../script/util
"
;
import
{
asyncDelay
,
onHomeworkFinish
}
from
"
../script/util
"
;
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent
"
;
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent
"
;
import
pg
from
"
./tool/pg
"
;
import
pg
from
"
./tool/pg
"
;
import
{
GameNGT14
}
from
"
./tool/Game
"
;
import
{
Block
,
BLOCK_TYPE
,
GameNGT14
,
Question
,
Option
}
from
"
./tool/Game
"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
@@ -69,6 +69,101 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -69,6 +69,101 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
}
}
gameStart
()
{
gameStart
()
{
this
.
updateQuestion
();
this
.
updateWords
();
}
private
layout_question
:
cc
.
Node
;
updateQuestion
()
{
let
data
=
GameNGT14
.
getIns
().
getCurrent
();
this
.
layout_question
=
pg
.
view
.
find
(
this
,
'
layout_question
'
);
let
img_big
=
pg
.
view
.
find
(
this
.
layout_question
,
'
base/img_big
'
);
let
img_small
=
pg
.
view
.
find
(
this
.
layout_question
,
'
base/img_small
'
);
let
label_big
=
pg
.
view
.
find
(
this
.
layout_question
,
'
base/label_big
'
);
let
label_small
=
pg
.
view
.
find
(
this
.
layout_question
,
'
base/label_small
'
);
// 需要处理数据
this
.
updateItem
(
this
.
layout_question
,
data
);
}
getLayByOption
(
option
:
Option
,
base
)
{
return
option
.
isDoubleLine
()
?
cc
.
instantiate
(
pg
.
view
.
find
(
base
,
'
layout_double
'
))
:
cc
.
instantiate
(
pg
.
view
.
find
(
base
,
'
layout_single
'
));
}
getNodeByBlock
(
block
:
Block
,
base
)
{
switch
(
block
.
type
)
{
case
BLOCK_TYPE
.
IMG
:
return
cc
.
instantiate
(
pg
.
view
.
find
(
base
,
'
img
'
))
case
BLOCK_TYPE
.
TXT
:
return
cc
.
instantiate
(
pg
.
view
.
find
(
base
,
'
label
'
))
case
BLOCK_TYPE
.
LINE
:
return
cc
.
instantiate
(
pg
.
view
.
find
(
base
,
'
line
'
))
case
BLOCK_TYPE
.
TAG
:
return
cc
.
instantiate
(
pg
.
view
.
find
(
base
,
'
tag
'
))
}
}
updateItem
(
item
,
data
:
Question
)
{
pg
.
view
.
visible
(
item
,
true
);
item
.
data
=
data
;
let
board
=
pg
.
view
.
find
(
item
,
'
board
'
);
let
base
=
pg
.
view
.
find
(
item
,
'
base
'
);
// 确定基础layout
let
layout
=
pg
.
view
.
find
(
item
,
'
layout
'
);
let
list
:
Array
<
Option
>
=
data
.
getList
();
list
.
forEach
(
option
=>
{
//确定使用的单双行
let
lay
=
this
.
getLayByOption
(
option
,
base
);
pg
.
view
.
addChild
(
layout
,
lay
);
let
blocks
=
option
.
getList
();
blocks
.
forEach
(
block
=>
{
//确定使用哪种节点
let
node
=
this
.
getNodeByBlock
(
block
,
base
);
pg
.
view
.
addChild
(
lay
,
node
);
this
.
updateNode
(
node
,
block
)
})
})
setTimeout
(()
=>
{
let
height
=
layout
.
height
;
item
.
height
=
height
+
15
;
},
0
);
// pg.view.touchOn(item, this.onTouchItem, this)
// let btn_ok = pg.view.find(item, 'btn_ok');
// pg.view.touchOn(btn_ok, this.onTouchOk, this)
}
updateNode
(
item
,
block
:
Block
)
{
item
.
data
=
block
;
switch
(
block
.
type
)
{
case
BLOCK_TYPE
.
IMG
:
this
.
updateImg
(
item
,
block
)
break
case
BLOCK_TYPE
.
TXT
:
this
.
updateLabel
(
item
,
block
)
break
case
BLOCK_TYPE
.
LINE
:
this
.
updateLine
(
item
,
block
)
break
case
BLOCK_TYPE
.
TAG
:
this
.
updateTag
(
item
,
block
)
break
}
}
updateImg
(
item
,
block
:
Block
)
{
pg
.
view
.
setNetImg
(
item
,
block
.
img
,
{
w
:
253
,
h
:
174
})
}
updateLine
(
item
,
block
:
Block
)
{
item
.
width
=
block
.
line
*
30
;
pg
.
view
.
visible
(
pg
.
view
.
find
(
item
,
'
label/input_cursor
'
),
false
)
// pg.view.touchOn(item, this.onTouchLine, this);
}
updateLabel
(
item
,
block
:
Block
)
{
pg
.
view
.
setString
(
item
,
block
.
text
)
}
updateTag
(
item
,
block
:
Block
)
{
let
tag_default
=
pg
.
view
.
find
(
item
,
'
tag_default
'
)
let
tag_input
=
pg
.
view
.
find
(
item
,
'
tag_input
'
)
pg
.
view
.
setString
(
pg
.
view
.
find
(
tag_default
,
'
label
'
),
block
.
tag
)
pg
.
view
.
setString
(
pg
.
view
.
find
(
tag_input
,
'
label
'
),
block
.
tag
)
}
updateWords
()
{
let
word
=
pg
.
view
.
find
(
this
,
'
word
'
);
let
word
=
pg
.
view
.
find
(
this
,
'
word
'
);
this
.
layout_words
=
pg
.
view
.
find
(
this
,
'
layout_words
'
);
this
.
layout_words
=
pg
.
view
.
find
(
this
,
'
layout_words
'
);
this
.
layout_words
.
removeAllChildren
()
this
.
layout_words
.
removeAllChildren
()
...
...
assets/cocos_generator/scene/tool/pg.ts
View file @
c31b11a3
...
@@ -131,7 +131,7 @@ let pg = {
...
@@ -131,7 +131,7 @@ let pg = {
return
node
;
return
node
;
},
},
//添加节点
//添加节点
addChild
(
item
,
child
,
zIndex
)
{
addChild
(
item
,
child
,
zIndex
=
0
)
{
if
(
!
child
)
return
console
.
log
(
"
addChild error ->请传入子节点
"
);
if
(
!
child
)
return
console
.
log
(
"
addChild error ->请传入子节点
"
);
if
(
!
item
)
return
console
.
log
(
"
addChild error ->请传入父节点
"
);
if
(
!
item
)
return
console
.
log
(
"
addChild error ->请传入父节点
"
);
let
node
=
item
.
node
?
item
.
node
:
item
;
let
node
=
item
.
node
?
item
.
node
:
item
;
...
...
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