Commit 953b0d58 authored by Tt's avatar Tt

基础换色完成

parent c31b11a3
......@@ -84,28 +84,28 @@
"__id__": 27
},
{
"__id__": 43
"__id__": 50
},
{
"__id__": 52
"__id__": 73
},
{
"__id__": 54
"__id__": 75
},
{
"__id__": 68
"__id__": 89
}
],
"_active": true,
"_components": [
{
"__id__": 69
"__id__": 90
},
{
"__id__": 70
"__id__": 91
},
{
"__id__": 71
"__id__": 92
}
],
"_prefab": null,
......@@ -1319,7 +1319,7 @@
"__id__": 28
},
{
"__id__": 41
"__id__": 48
}
],
"_active": true,
......@@ -1396,10 +1396,19 @@
"__id__": 37
},
{
"__id__": 39
"__id__": 41
},
{
"__id__": 43
},
{
"__id__": 45
},
{
"__id__": 46
}
],
"_active": true,
"_active": false,
"_components": [],
"_prefab": null,
"_opacity": 255,
......@@ -1457,7 +1466,7 @@
"__id__": 28
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 30
......@@ -1486,8 +1495,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-0.368,
8.496,
0,
0,
0,
0,
0,
......@@ -1545,13 +1554,13 @@
},
{
"__type__": "cc.Node",
"_name": "img_small",
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 28
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 32
......@@ -1580,8 +1589,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
4.632,
103.496,
0,
0,
0,
0,
0,
......@@ -1645,7 +1654,7 @@
"__id__": 28
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 34
......@@ -1736,13 +1745,13 @@
},
{
"__type__": "cc.Node",
"_name": "label_small",
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 28
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 36
......@@ -1833,16 +1842,81 @@
},
{
"__type__": "cc.Node",
"_name": "layout_double",
"_name": "line",
"_objFlags": 0,
"_parent": {
"__id__": 28
},
"_children": [
{
"__id__": 38
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-292.503,
-52.21,
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": "f19hM8Tf9O17zg1VYg4CJ/"
},
{
"__type__": "cc.Node",
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 37
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 38
"__id__": 39
},
{
"__id__": 40
}
],
"_prefab": null,
......@@ -1856,8 +1930,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 710,
"height": 180
"width": 100,
"height": 5
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1868,8 +1942,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
105.42,
50,
-27.5,
0,
0,
0,
......@@ -1891,43 +1965,70 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "eaIDzdRGxC0KMXCTu3xwbD"
"_id": "42K+anIhZHB4ijNtMwAdd5"
},
{
"__type__": "cc.Layout",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
"__id__": 38
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 300,
"height": 200
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_resize": 0,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_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": "d0hGysL6hAcI+ZE9pequ5q"
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "0fMC9VPnZODrmwE4h+FSkR"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 44,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 0,
"_id": "b3w4VsObRB2qaxS4ViQyyH"
},
{
"__type__": "cc.Node",
"_name": "layout_single",
"_name": "layout_double",
"_objFlags": 0,
"_parent": {
"__id__": 28
......@@ -1936,7 +2037,7 @@
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 42
}
],
"_prefab": null,
......@@ -1951,7 +2052,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 710,
"height": 90
"height": 180
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1985,20 +2086,20 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cfoW7RsWlN2KnZvwEvFTQz"
"_id": "eaIDzdRGxC0KMXCTu3xwbD"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 41
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 710,
"height": 90
"width": 300,
"height": 200
},
"_resize": 0,
"_N$layoutType": 1,
......@@ -2017,20 +2118,20 @@
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "90rNf33aVK1oK4MbgrjHHi"
"_id": "d0hGysL6hAcI+ZE9pequ5q"
},
{
"__type__": "cc.Node",
"_name": "layout",
"_name": "layout_single",
"_objFlags": 0,
"_parent": {
"__id__": 27
"__id__": 28
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
"__id__": 44
}
],
"_prefab": null,
......@@ -2045,7 +2146,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 710,
"height": 400
"height": 90
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2057,7 +2158,7 @@
"ctor": "Float64Array",
"array": [
0,
0,
105.42,
0,
0,
0,
......@@ -2079,23 +2180,23 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "af7uWqgjRPlYdfymvp5VJ1"
"_id": "cfoW7RsWlN2KnZvwEvFTQz"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"__id__": 43
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 300,
"height": 200
"width": 710,
"height": 90
},
"_resize": 0,
"_N$layoutType": 2,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
......@@ -2111,29 +2212,16 @@
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "b5bt4tM/ZHirLJgch2RT8p"
"_id": "90rNf33aVK1oK4MbgrjHHi"
},
{
"__type__": "cc.Node",
"_name": "block",
"_name": "layout_full",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 44
},
{
"__id__": 46
},
{
"__id__": 48
"__id__": 28
},
{
"__id__": 50
}
],
"_children": [],
"_active": true,
"_components": [],
"_prefab": null,
......@@ -2147,8 +2235,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
"width": 710,
"height": 400
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2159,8 +2247,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-676.319,
1274.723,
0,
-2.558,
0,
0,
0,
......@@ -2182,35 +2270,35 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "00h3m2hmJADoL9HVkPmt0G"
"_id": "37kI6cBU9KQJkTvw/0Q627"
},
{
"__type__": "cc.Node",
"_name": "New Sprite(Splash)",
"_name": "layout_center",
"_objFlags": 0,
"_parent": {
"__id__": 43
"__id__": 28
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
"__id__": 47
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 222,
"g": 211,
"b": 211,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
"width": 710,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2221,8 +2309,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
4.341,
-1.889,
0,
0,
0,
0,
0,
......@@ -2244,14 +2332,764 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "72hhHPTf1K/L6AI0BtFZbx"
"_id": "ccdLNRfs9PfqRH9Cld76nO"
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
"__id__": 46
},
"_enabled": false,
"_layoutSize": {
"__type__": "cc.Size",
"width": 300,
"height": 200
},
"_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": "16ZaEsNDBAaI+GtUHKIh2i"
},
{
"__type__": "cc.Node",
"_name": "layout",
"_objFlags": 0,
"_parent": {
"__id__": 27
},
"_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": 710,
"height": 400
},
"_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": "af7uWqgjRPlYdfymvp5VJ1"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 300,
"height": 200
},
"_resize": 0,
"_N$layoutType": 2,
"_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": "b5bt4tM/ZHirLJgch2RT8p"
},
{
"__type__": "cc.Node",
"_name": "block",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 51
},
{
"__id__": 53
},
{
"__id__": 55
},
{
"__id__": 57
},
{
"__id__": 59
},
{
"__id__": 61
},
{
"__id__": 63
},
{
"__id__": 65
},
{
"__id__": 67
},
{
"__id__": 69
},
{
"__id__": 71
}
],
"_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": "img_undone",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 52
}
],
"_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": "cf6AeLIhlFSJVtdmBmqHYc"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
},
"_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__": 50
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 54
}
],
"_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": "72OEwS0MBBw6RD37Ah5ooa"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 53
},
"_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__": 50
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 56
}
],
"_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__": 55
},
"_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": "img_keyboard_1",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 58
}
],
"_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": "3aXVA/wgZGrYrgSX6gBwsT"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d73e27cb-0c23-4983-8a9e-91bf00ede44d"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "48gN3IHKpMO7iUE69lKEku"
},
{
"__type__": "cc.Node",
"_name": "img_keyboard_2",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 60
}
],
"_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": "80TRl4A+NB7ZHZ+wX/e5nj"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "e52a407a-936e-4c07-8f22-d71ba8d59a1e"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "b5s3HptXlA6qh1R8QOv+pk"
},
{
"__type__": "cc.Node",
"_name": "img_keyboard_3",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 62
}
],
"_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": "acpqUHvQFOsq33OkqzUR17"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 61
},
"_enabled": true,
"_materials": [
......@@ -2262,10 +3100,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
"__uuid__": "09fc13c9-6cc6-4fce-bf70-4d06415ba08d"
},
"_type": 0,
"_sizeMode": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -2276,20 +3114,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "dalq52ff9LvJsuj59b01sm"
"_id": "831zOY3/xOL4dyMxXcQBhw"
},
{
"__type__": "cc.Node",
"_name": "img_undone",
"_name": "img_keyboard_4",
"_objFlags": 0,
"_parent": {
"__id__": 43
"__id__": 50
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 47
"__id__": 64
}
],
"_prefab": null,
......@@ -2303,8 +3141,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 79,
"height": 79
"width": 82,
"height": 83
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2315,8 +3153,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1.551,
1.59,
0,
0,
0,
0,
0,
......@@ -2338,14 +3176,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cf6AeLIhlFSJVtdmBmqHYc"
"_id": "3cHInp3thHoYjiJFUPdZmp"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 46
"__id__": 63
},
"_enabled": true,
"_materials": [
......@@ -2356,7 +3194,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7601ec7c-8dbc-45eb-8c16-9b4ae3a441e5"
"__uuid__": "f88d7e99-6839-485e-b716-c42a86e6f211"
},
"_type": 0,
"_sizeMode": 1,
......@@ -2370,20 +3208,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "8dzFwAYi5H7qoHzSpTofvj"
"_id": "59alhPa4tC3bizlfhnbdhK"
},
{
"__type__": "cc.Node",
"_name": "img_focus",
"_name": "img_keyboard_5",
"_objFlags": 0,
"_parent": {
"__id__": 43
"__id__": 50
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 49
"__id__": 66
}
],
"_prefab": null,
......@@ -2409,8 +3247,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
3.532,
0.136,
0,
0,
0,
0,
0,
......@@ -2432,14 +3270,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "72OEwS0MBBw6RD37Ah5ooa"
"_id": "290Y607mhE+br6wJhVTsnd"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
"__id__": 65
},
"_enabled": true,
"_materials": [
......@@ -2450,7 +3288,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8761f126-e248-45c9-adbd-7c779f0bb24a"
"__uuid__": "b84ff9cf-55fd-419e-ba3a-80afeb684b68"
},
"_type": 0,
"_sizeMode": 1,
......@@ -2464,20 +3302,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "cfyB+TEj5C0rKYNP4msUgn"
"_id": "08wxGiNi1LbIAWLxTnRcPT"
},
{
"__type__": "cc.Node",
"_name": "img_focus2",
"_name": "img_right",
"_objFlags": 0,
"_parent": {
"__id__": 43
"__id__": 50
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 51
"__id__": 68
}
],
"_prefab": null,
......@@ -2526,15 +3364,203 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a8ZCdshfpMZriL11LH8KrK"
"_id": "15Pic0ug1CYbtDcU7IJxWQ"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 67
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b25c89da-1076-411f-adc2-f8991223cb27"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a6BKsvcVFIkIBdjWoLx/K5"
},
{
"__type__": "cc.Node",
"_name": "img_right_wrong",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 70
}
],
"_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": "70NIHcP5lPn7tIpQYD6MhY"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "828acf9d-c834-40ea-bf99-5a06ecd6bfc9"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "c4eFCG219M7KV1xKqwFNK9"
},
{
"__type__": "cc.Node",
"_name": "img_wrong",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 72
}
],
"_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": "fd7KtN2spBhYIf8zwpioGa"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 71
},
"_enabled": true,
"_materials": [
{
......@@ -2544,7 +3570,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4738d102-7b1b-4d92-9942-9ddc9e5edab8"
"__uuid__": "13b26977-e21d-4d83-a17a-bfa144a4fe02"
},
"_type": 0,
"_sizeMode": 1,
......@@ -2558,7 +3584,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "d3t9BYmZtDX5ZRYdEjEeyQ"
"_id": "84S/92Jc9F66tlezZm0sbS"
},
{
"__type__": "cc.Node",
......@@ -2571,7 +3597,7 @@
"_active": true,
"_components": [
{
"__id__": 53
"__id__": 74
}
],
"_prefab": null,
......@@ -2627,7 +3653,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 52
"__id__": 73
},
"_enabled": true,
"alignMode": 1,
......@@ -2658,28 +3684,28 @@
},
"_children": [
{
"__id__": 55
"__id__": 76
},
{
"__id__": 57
"__id__": 78
},
{
"__id__": 59
"__id__": 80
},
{
"__id__": 61
"__id__": 82
},
{
"__id__": 63
"__id__": 84
},
{
"__id__": 65
"__id__": 86
}
],
"_active": true,
"_components": [
{
"__id__": 67
"__id__": 88
}
],
"_prefab": null,
......@@ -2710,8 +3736,8 @@
0,
0,
0,
0.026176948307873153,
0.9996573249755573,
0,
1,
1,
1,
1
......@@ -2721,7 +3747,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 3
"z": 0
},
"_skewX": 0,
"_skewY": 0,
......@@ -2735,13 +3761,13 @@
"_name": "img_keyboard_1",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 75
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
"__id__": 77
}
],
"_prefab": null,
......@@ -2797,7 +3823,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
"__id__": 76
},
"_enabled": true,
"_materials": [
......@@ -2829,13 +3855,13 @@
"_name": "img_keyboard_2",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 75
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 58
"__id__": 79
}
],
"_prefab": null,
......@@ -2891,7 +3917,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
"__id__": 78
},
"_enabled": true,
"_materials": [
......@@ -2923,13 +3949,13 @@
"_name": "img_keyboard_3",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 75
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 60
"__id__": 81
}
],
"_prefab": null,
......@@ -2985,7 +4011,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
"__id__": 80
},
"_enabled": true,
"_materials": [
......@@ -3017,13 +4043,13 @@
"_name": "img_keyboard_4",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 75
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 62
"__id__": 83
}
],
"_prefab": null,
......@@ -3079,7 +4105,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 61
"__id__": 82
},
"_enabled": true,
"_materials": [
......@@ -3111,13 +4137,13 @@
"_name": "img_keyboard_5",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 75
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 64
"__id__": 85
}
],
"_prefab": null,
......@@ -3173,7 +4199,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 84
},
"_enabled": true,
"_materials": [
......@@ -3205,13 +4231,13 @@
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 75
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 66
"__id__": 87
}
],
"_prefab": null,
......@@ -3225,8 +4251,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 57.42,
"height": 113.4
"width": 54.23,
"height": 107.1
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3238,7 +4264,7 @@
"ctor": "Float64Array",
"array": [
0,
0,
8,
0,
0,
0,
......@@ -3267,7 +4293,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 65
"__id__": 86
},
"_enabled": true,
"_materials": [
......@@ -3279,8 +4305,8 @@
"_dstBlendFactor": 771,
"_string": "R",
"_N$string": "R",
"_fontSize": 90,
"_lineHeight": 90,
"_fontSize": 85,
"_lineHeight": 85,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "6d6846ac-918f-46f0-aff7-53ca2e2734ef"
......@@ -3302,7 +4328,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
"__id__": 75
},
"_enabled": true,
"_normalMaterial": null,
......@@ -3363,7 +4389,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 54
"__id__": 75
},
"_id": "a5CSFc15pHJrUqBqHzlHYf"
},
......
......@@ -48,49 +48,39 @@ export default class SceneComponent extends MyCocosSceneComponent {
initListener() {
}
private layout_blocks: cc.Node;
private layout_words: cc.Node;
initBlocks() {
this.layout_blocks = pg.view.find(this, 'layout_blocks');
this.layout_blocks.removeAllChildren()
let block = pg.view.find(this, 'block');
//动态创建,并给每一个打上编号
let space = { x: 9 + 80, y: 10 + 80 }
for (let y = 0; y < 9; y++) {
for (let x = 0; x < 12; x++) {
let node = cc.instantiate(block);
let data = { x, y };
node.data = data;
node.x = -495 + space.x * x;
node.y = 365 - space.y * y;
node.active = !!GameNGT14.getIns().getBlockVal(x, y);
this.layout_blocks.addChild(node);
}
}
}
gameStart() {
this.updateQuestion();
this.updateHightLight();
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);
this.updateItem(this.layout_question, data);
}
getLayByOption(option: Option, base) {
getLayByOption(option: Option, base, { onlyImg, showCenter }) {
if (onlyImg) {
return cc.instantiate(pg.view.find(base, 'layout_full'))
} else if (showCenter) {
return cc.instantiate(pg.view.find(base, 'layout_center'))
} else {
return option.isDoubleLine() ? cc.instantiate(pg.view.find(base, 'layout_double')) : cc.instantiate(pg.view.find(base, 'layout_single'));
}
getNodeByBlock(block: Block, base) {
}
getNodeByBlock(block: Block, base, { onlyImg }) {
switch (block.type) {
case BLOCK_TYPE.IMG:
if (onlyImg) {
return cc.instantiate(pg.view.find(base, 'img_big'))
} else {
return cc.instantiate(pg.view.find(base, 'img'))
}
case BLOCK_TYPE.TXT:
return cc.instantiate(pg.view.find(base, 'label'))
case BLOCK_TYPE.LINE:
......@@ -103,19 +93,22 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.visible(item, true);
item.data = data;
let board = pg.view.find(item, 'board');
// 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 blocks = option.getList();
let showCenter = blocks.length == 1 && blocks[0].type == BLOCK_TYPE.IMG;
let onlyImg = list.length == 1 && showCenter;
//确定使用的单双行
let lay = this.getLayByOption(option, base);
let lay = this.getLayByOption(option, base, { onlyImg, showCenter });
pg.view.addChild(layout, lay);
let blocks = option.getList();
blocks.forEach(block => {
//确定使用哪种节点
let node = this.getNodeByBlock(block, base);
let node = this.getNodeByBlock(block, base, { onlyImg });
node.y = 0;
pg.view.addChild(lay, node);
this.updateNode(node, block)
})
......@@ -124,9 +117,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
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;
......@@ -146,11 +136,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
updateImg(item, block: Block) {
pg.view.setNetImg(item, block.img, { w: 253, h: 174 })
pg.view.setNetImg(item, block.img, { w: item.width, h: item.height })
}
updateLine(item, block: Block) {
item.width = block.line * 30;
pg.view.visible(pg.view.find(item, 'label/input_cursor'), false)
// pg.view.visible(pg.view.find(item, 'label/input_cursor'), false)
// pg.view.touchOn(item, this.onTouchLine, this);
}
updateLabel(item, block: Block) {
......@@ -162,7 +152,52 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.setString(pg.view.find(tag_default, 'label'), block.tag)
pg.view.setString(pg.view.find(tag_input, 'label'), block.tag)
}
//----------------------------------------左侧方块部分-----------------------------------
private layout_blocks: cc.Node;
initBlocks() {
this.layout_blocks = pg.view.find(this, 'layout_blocks');
this.layout_blocks.removeAllChildren()
let block = pg.view.find(this, 'block');
//动态创建,并给每一个打上编号
let space = { x: 9 + 80, y: 10 + 80 }
for (let y = 0; y < 9; y++) {
for (let x = 0; x < 12; x++) {
let node = cc.instantiate(block);
let data = { x, y, val: '' };
node.data = data;
node.x = -495 + space.x * x;
node.y = 365 - space.y * y;
node.active = !!GameNGT14.getIns().getBlockVal(x, y);
this.layout_blocks.addChild(node);
}
}
}
// 更新面板高亮
updateHightLight() {
let list = GameNGT14.getIns().getHightList();
let first = null;
this.layout_blocks.children.forEach(node => {
let point = node.data;
if (list.some(li => li.compare(point))) {
pg.view.visible(pg.view.find(node, 'img_undone'), false)
pg.view.visible(pg.view.find(node, 'img_focus'), true)
if (!point.val && !first) {
first = true;
pg.view.visible(pg.view.find(node, 'img_focus2'), true)
}
} else {
pg.view.visible(pg.view.find(node, 'img_undone'), true)
pg.view.visible(pg.view.find(node, 'img_focus'), false)
pg.view.visible(pg.view.find(node, 'img_focus2'), false)
}
})
}
getBlockNodeByPos(x, y) {
return this.layout_blocks.children.find(node => node.data.x == x && node.data.y == y)
}
//----------------------------------------右下角单词部分-----------------------------------
private layout_words: cc.Node;
updateWords() {
let word = pg.view.find(this, 'word');
this.layout_words = pg.view.find(this, 'layout_words');
......@@ -188,8 +223,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
updateWord(node, data) {
node.data = data;
pg.view.setString(pg.view.find(node, 'label'), data);
node.rotation = data.rotation
pg.view.setString(pg.view.find(node, 'label'), data.word);
for (let i = 1; i <= 5; i++) {
pg.view.visible(pg.view.find(node, 'img_keyboard_' + i), data.color == i);
}
node.on(cc.Node.EventType.TOUCH_START, this.onItemTouchStart, this);
node.on(cc.Node.EventType.TOUCH_MOVE, this.onItemTouchMove, this);
node.on(cc.Node.EventType.TOUCH_END, this.onItemTouchEnd, this);
......@@ -298,6 +336,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
playLocalAudio(audioName) {
const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource);
return new Promise((resolve, reject) => {
......
......@@ -80,13 +80,13 @@ export class Option {
}
export class Question {
public static id: number = 1000;
public id: number;
public id: string;
public list: Array<Option>;
public submit: BOARD_STATE;
public words;
public answer;
constructor(data) {
this.id = Question.id++;
this.id = data.id;
console.log(data);
this.list = data.options.map(option => new Option(option));
this.submit = BOARD_STATE.DEFAULT
......@@ -96,14 +96,22 @@ export class Question {
let str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
this.words.push(str[Math.floor(Math.random() * str.length)])
}
for (let i = 0; i < 10; i++) {
this.words.sort((A, B) => {
return Math.random() < 0.5
})
}
}
getWords() {
return this.words.concat();
let rand = Math.floor(Math.random() * 100);
let words = this.words.map((w, index) => {
return {
word: w,
color: (index + rand) % 5 + 1,
rotation: Math.random() < 0.5 ? 3 : -3
}
});
for (let i = 0; i < 10; i++) {
words.sort((A, B) => {
return Math.random() - 0.5
});
}
return words;
}
setSubmit(state) {
this.submit = state
......@@ -124,6 +132,7 @@ export class Question {
export class GameNGT14 {
public questions: Array<Question>
public blocks: Array<{ val: string }>
public blockStruct: Array<{ pId: string, answer: string, point: { x: number, y: number } }>
public current: number;
public title: string;
public total: number;
......@@ -140,6 +149,7 @@ export class GameNGT14 {
initData(data) {
console.log(data);
this.questions = data.questions[0].parts.map(part => new Question(part));
this.blockStruct = data.blockStruct;
this.blocks = data.blocks;
this.title = data.title;
this.startAudio = data.startAudio || "";
......@@ -149,7 +159,21 @@ export class GameNGT14 {
if (!this.blocks[y] || !this.blocks[y][x]) return;
return this.blocks[y][x].val;
}
getHightList() {
let data = this.getCurrent();
let line = this.blockStruct.find(block => block.pId == data.id);
let list = [];
for (let i = 0; i < line.answer.length; i++) {
list.push({
x: line.point.x + i,
y: line.point.y,
compare: function (p) {
return this.x == p.x && this.y == p.y;
}
})
}
return list
}
getCurrent(): Question {
return this.questions[this.current];
}
......
......@@ -3,7 +3,7 @@ export const defaultData = {
{
"parts": [{
"id": "166668702213640281",
"answer": "freedow",
"answer": "freedom",
"options": [
{
"blocks": [
......@@ -21,7 +21,7 @@ export const defaultData = {
}, {
"blocks": [
{
"type": "txt", "txt": "", "line": "", "img": "", "tag": "", "text": "On saturdays freedow"
"type": "txt", "txt": "", "line": "", "img": "", "tag": "", "text": "On saturdays freedom"
}
]
}]
......@@ -72,7 +72,7 @@ export const defaultData = {
{
"pId": "166668702213640281",
"point": { "x": 3, "y": 6 },
"answer": "freedow"
"answer": "freedom"
},
{
"pId": "1666687612725869271",
......
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 79,
"height": 79,
"width": 82,
"height": 83,
"platformSettings": {},
"subMetas": {
"img_undone": {
......@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 79,
"height": 79,
"rawWidth": 79,
"rawHeight": 79,
"width": 82,
"height": 83,
"rawWidth": 82,
"rawHeight": 83,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 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 to comment