Commit e41f742d authored by Tt's avatar Tt

基础整理

parent 1a487a13
...@@ -675,16 +675,13 @@ ...@@ -675,16 +675,13 @@
"__id__": 16 "__id__": 16
}, },
{ {
"__id__": 23 "__id__": 29
},
{
"__id__": 24
}, },
{ {
"__id__": 33 "__id__": 30
}, },
{ {
"__id__": 64 "__id__": 39
}, },
{ {
"__id__": 70 "__id__": 70
...@@ -818,6 +815,9 @@ ...@@ -818,6 +815,9 @@
}, },
{ {
"__id__": 21 "__id__": 21
},
{
"__id__": 23
} }
], ],
"_active": true, "_active": true,
...@@ -1153,12 +1153,19 @@ ...@@ -1153,12 +1153,19 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "layout_question", "_name": "row",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 14 "__id__": 16
}, },
"_children": [], "_children": [
{
"__id__": 24
},
{
"__id__": 26
}
],
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": null, "_prefab": null,
...@@ -1185,7 +1192,7 @@ ...@@ -1185,7 +1192,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
0, -50,
0, 0,
0, 0,
0, 0,
...@@ -1207,25 +1214,22 @@ ...@@ -1207,25 +1214,22 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "b6ksNki6dNcq1AHwBcYv+J" "_id": "09VsFdn6pJgpQlrgYTiiJQ"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "countdown", "_name": "right",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 14 "__id__": 23
}, },
"_children": [ "_children": [],
"_active": false,
"_components": [
{ {
"__id__": 25 "__id__": 25
},
{
"__id__": 29
} }
], ],
"_active": true,
"_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -1237,8 +1241,8 @@ ...@@ -1237,8 +1241,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 205,
"height": 0 "height": 165
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1250,7 +1254,7 @@ ...@@ -1250,7 +1254,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
-700, 110,
0, 0,
0, 0,
0, 0,
...@@ -1272,101 +1276,70 @@ ...@@ -1272,101 +1276,70 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "f3YrcC0v9FP4Bg7jVa3YDk" "_id": "25XM4ouxhHN6nrqUhPOC/e"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Sprite",
"_name": "countdown1", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "node": {
"__id__": 24 "__id__": 24
}, },
"_children": [ "_enabled": true,
{ "_materials": [
"__id__": 26
}
],
"_active": false,
"_components": [
{ {
"__id__": 28 "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
} }
], ],
"_prefab": null, "_srcBlendFactor": 770,
"_opacity": 255, "_dstBlendFactor": 771,
"_color": { "_spriteFrame": {
"__type__": "cc.Color", "__uuid__": "f61ac33c-f363-4ffd-a868-fcfc6b0e94fe"
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 489,
"height": 238
}, },
"_anchorPoint": { "_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2", "__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, "x": 0,
"y": 0, "y": 0
"z": 0
}, },
"_skewX": 0, "_fillStart": 0,
"_skewY": 0, "_fillRange": 0,
"_is3DNode": false, "_isTrimmedMode": true,
"_groupIndex": 0, "_atlas": null,
"groupIndex": 0, "_id": "70pePch5pH05vhaXn/Ra67"
"_id": "06VLVzVA9G55/ucexV+9aK"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "countdown1", "_name": "mistake",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 25 "__id__": 23
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 27 "__id__": 27
},
{
"__id__": 28
} }
], ],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 254, "r": 255,
"g": 220, "g": 255,
"b": 36, "b": 255,
"a": 255 "a": 255
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 183.52, "width": 168,
"height": 75.6 "height": 165
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1377,8 +1350,8 @@ ...@@ -1377,8 +1350,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
50, 0,
-30, 110,
0, 0,
0, 0,
0, 0,
...@@ -1400,47 +1373,14 @@ ...@@ -1400,47 +1373,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "baiwS77VhOFKs43gT5lQ0+" "_id": "29yFlPgTVI/YlO9pIGYct+"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 26
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "58.198",
"_N$string": "58.198",
"_fontSize": 60,
"_lineHeight": 60,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "8cpW+6TtNBS4V1A6zc9NuM"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 25 "__id__": 26
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1451,7 +1391,7 @@ ...@@ -1451,7 +1391,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "acc06b37-23b9-4b3b-9350-e8411fba954a" "__uuid__": "171e9395-7887-4681-b4ff-c10c66c1ac67"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -1463,28 +1403,39 @@ ...@@ -1463,28 +1403,39 @@
}, },
"_fillStart": 0, "_fillStart": 0,
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": false,
"_atlas": null, "_atlas": null,
"_id": "bdbRfVfwNDyZ2nEjHGm5I2" "_id": "75Uao8F8dLA4vz+1Go/A44"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 26
},
"_enabled": true,
"_clip": {
"__uuid__": "82573ceb-7132-4a68-980e-355366e393ef"
},
"_volume": 1,
"_mute": false,
"_loop": true,
"_firstlyEnabled": true,
"playOnLoad": true,
"preload": true,
"_id": "9eLbH6gqxLgKKBwTgFYzux"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "countdown2", "_name": "layout_question",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 24 "__id__": 14
}, },
"_children": [ "_children": [],
{ "_active": true,
"__id__": 30 "_components": [],
}
],
"_active": false,
"_components": [
{
"__id__": 32
}
],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -1496,8 +1447,8 @@ ...@@ -1496,8 +1447,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 489, "width": 0,
"height": 238 "height": 0
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1531,35 +1482,38 @@ ...@@ -1531,35 +1482,38 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "4dKYWSPGhEZYXVKKfcP1xx" "_id": "b6ksNki6dNcq1AHwBcYv+J"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "countdown2", "_name": "countdown",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 29 "__id__": 14
}, },
"_children": [], "_children": [
"_active": true,
"_components": [
{ {
"__id__": 31 "__id__": 31
},
{
"__id__": 35
} }
], ],
"_active": true,
"_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 254, "r": 255,
"g": 220, "g": 255,
"b": 36, "b": 255,
"a": 255 "a": 255
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 183.52, "width": 0,
"height": 75.6 "height": 0
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1570,7 +1524,135 @@ ...@@ -1570,7 +1524,135 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
50, 0,
-700,
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": "f3YrcC0v9FP4Bg7jVa3YDk"
},
{
"__type__": "cc.Node",
"_name": "countdown1",
"_objFlags": 0,
"_parent": {
"__id__": 30
},
"_children": [
{
"__id__": 32
}
],
"_active": false,
"_components": [
{
"__id__": 34
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 489,
"height": 238
},
"_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": "06VLVzVA9G55/ucexV+9aK"
},
{
"__type__": "cc.Node",
"_name": "countdown1",
"_objFlags": 0,
"_parent": {
"__id__": 31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 33
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 254,
"g": 220,
"b": 36,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 183.52,
"height": 75.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
50,
-30, -30,
0, 0,
0, 0,
...@@ -1593,15 +1675,208 @@ ...@@ -1593,15 +1675,208 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "d8kRzVywNPibGWOTNd1k8M" "_id": "baiwS77VhOFKs43gT5lQ0+"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 32
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "58.198",
"_N$string": "58.198",
"_fontSize": 60,
"_lineHeight": 60,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "8cpW+6TtNBS4V1A6zc9NuM"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "acc06b37-23b9-4b3b-9350-e8411fba954a"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "bdbRfVfwNDyZ2nEjHGm5I2"
},
{
"__type__": "cc.Node",
"_name": "countdown2",
"_objFlags": 0,
"_parent": {
"__id__": 30 "__id__": 30
}, },
"_children": [
{
"__id__": 36
}
],
"_active": false,
"_components": [
{
"__id__": 38
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 489,
"height": 238
},
"_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": "4dKYWSPGhEZYXVKKfcP1xx"
},
{
"__type__": "cc.Node",
"_name": "countdown2",
"_objFlags": 0,
"_parent": {
"__id__": 35
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 37
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 254,
"g": 220,
"b": 36,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 183.52,
"height": 75.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
50,
-30,
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": "d8kRzVywNPibGWOTNd1k8M"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
},
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
{ {
...@@ -1633,7 +1908,7 @@ ...@@ -1633,7 +1908,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 29 "__id__": 35
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1669,13 +1944,13 @@ ...@@ -1669,13 +1944,13 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 34 "__id__": 40
}, },
{ {
"__id__": 41 "__id__": 47
}, },
{ {
"__id__": 45 "__id__": 51
} }
], ],
"_active": true, "_active": true,
...@@ -1733,23 +2008,23 @@ ...@@ -1733,23 +2008,23 @@
"_name": "ProgressBar", "_name": "ProgressBar",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 33 "__id__": 39
}, },
"_children": [ "_children": [
{ {
"__id__": 35 "__id__": 41
}, },
{ {
"__id__": 37 "__id__": 43
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 39 "__id__": 45
}, },
{ {
"__id__": 40 "__id__": 46
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1805,13 +2080,13 @@ ...@@ -1805,13 +2080,13 @@
"_name": "bar", "_name": "bar",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 34 "__id__": 40
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 36 "__id__": 42
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1867,7 +2142,7 @@ ...@@ -1867,7 +2142,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 35 "__id__": 41
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1899,13 +2174,13 @@ ...@@ -1899,13 +2174,13 @@
"_name": "ColoredProgressBar", "_name": "ColoredProgressBar",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 34 "__id__": 40
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 38 "__id__": 44
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1961,7 +2236,7 @@ ...@@ -1961,7 +2236,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 37 "__id__": 43
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1993,7 +2268,7 @@ ...@@ -1993,7 +2268,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 34 "__id__": 40
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2025,12 +2300,12 @@ ...@@ -2025,12 +2300,12 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 34 "__id__": 40
}, },
"_enabled": true, "_enabled": true,
"_N$totalLength": 442, "_N$totalLength": 442,
"_N$barSprite": { "_N$barSprite": {
"__id__": 36 "__id__": 42
}, },
"_N$mode": 0, "_N$mode": 0,
"_N$progress": 0, "_N$progress": 0,
...@@ -2042,17 +2317,17 @@ ...@@ -2042,17 +2317,17 @@
"_name": "star", "_name": "star",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 33 "__id__": 39
}, },
"_children": [ "_children": [
{ {
"__id__": 42 "__id__": 48
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 44 "__id__": 50
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2108,13 +2383,13 @@ ...@@ -2108,13 +2383,13 @@
"_name": "questionnumber", "_name": "questionnumber",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 41 "__id__": 47
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 43 "__id__": 49
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2170,7 +2445,7 @@ ...@@ -2170,7 +2445,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 42 "__id__": 48
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2203,7 +2478,7 @@ ...@@ -2203,7 +2478,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 41 "__id__": 47
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2235,18 +2510,9 @@ ...@@ -2235,18 +2510,9 @@
"_name": "star2", "_name": "star2",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 33 "__id__": 39
}, },
"_children": [ "_children": [
{
"__id__": 46
},
{
"__id__": 48
},
{
"__id__": 50
},
{ {
"__id__": 52 "__id__": 52
}, },
...@@ -2264,6 +2530,15 @@ ...@@ -2264,6 +2530,15 @@
}, },
{ {
"__id__": 62 "__id__": 62
},
{
"__id__": 64
},
{
"__id__": 66
},
{
"__id__": 68
} }
], ],
"_active": true, "_active": true,
...@@ -2321,13 +2596,13 @@ ...@@ -2321,13 +2596,13 @@
"_name": "star2", "_name": "star2",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 45 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 47 "__id__": 53
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2383,7 +2658,7 @@ ...@@ -2383,7 +2658,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 46 "__id__": 52
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2415,13 +2690,13 @@ ...@@ -2415,13 +2690,13 @@
"_name": "star2", "_name": "star2",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 45 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 49 "__id__": 55
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2477,7 +2752,7 @@ ...@@ -2477,7 +2752,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 48 "__id__": 54
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2509,13 +2784,13 @@ ...@@ -2509,13 +2784,13 @@
"_name": "star2", "_name": "star2",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 45 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 51 "__id__": 57
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2571,7 +2846,7 @@ ...@@ -2571,7 +2846,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 50 "__id__": 56
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2603,13 +2878,13 @@ ...@@ -2603,13 +2878,13 @@
"_name": "group", "_name": "group",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 45 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 53 "__id__": 59
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2665,7 +2940,7 @@ ...@@ -2665,7 +2940,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 52 "__id__": 58
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2697,13 +2972,13 @@ ...@@ -2697,13 +2972,13 @@
"_name": "group", "_name": "group",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 45 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 55 "__id__": 61
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2759,7 +3034,7 @@ ...@@ -2759,7 +3034,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 54 "__id__": 60
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2791,13 +3066,13 @@ ...@@ -2791,13 +3066,13 @@
"_name": "group", "_name": "group",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 45 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 57 "__id__": 63
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2823,197 +3098,8 @@ ...@@ -2823,197 +3098,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
236, 236,
754, 754,
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": "61eaYNTSxDkpS6ONf6oDhZ"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 56
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "73c02965-4852-417b-af99-90aa9e9407b4"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "e3xUIFIUhAk5l/Yst7XfXv"
},
{
"__type__": "cc.Node",
"_name": "number",
"_objFlags": 0,
"_parent": {
"__id__": 45
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 59
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 22.25,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-65,
820,
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": "1b41WA4VROFp4aIDlgPpnY"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 58
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "7",
"_N$string": "7",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "08xjxm5GFJJ7n294vYTyNy"
},
{
"__type__": "cc.Node",
"_name": "number",
"_objFlags": 0,
"_parent": {
"__id__": 45
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 61
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 44.49,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
80,
820,
0, 0,
0, 0,
0, 0,
...@@ -3035,14 +3121,14 @@ ...@@ -3035,14 +3121,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "87HHcjBCxFn74NsvChwI5I" "_id": "61eaYNTSxDkpS6ONf6oDhZ"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 60 "__id__": 62
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3052,36 +3138,35 @@ ...@@ -3052,36 +3138,35 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "10", "_spriteFrame": {
"_N$string": "10", "__uuid__": "73c02965-4852-417b-af99-90aa9e9407b4"
"_fontSize": 40, },
"_lineHeight": 40, "_type": 0,
"_enableWrapText": true, "_sizeMode": 1,
"_N$file": null, "_fillType": 0,
"_isSystemFontUsed": true, "_fillCenter": {
"_spacingX": 0, "__type__": "cc.Vec2",
"_batchAsBitmap": false, "x": 0,
"_styleFlags": 0, "y": 0
"_underlineHeight": 0, },
"_N$horizontalAlign": 1, "_fillStart": 0,
"_N$verticalAlign": 1, "_fillRange": 0,
"_N$fontFamily": "Arial", "_isTrimmedMode": true,
"_N$overflow": 0, "_atlas": null,
"_N$cacheMode": 0, "_id": "e3xUIFIUhAk5l/Yst7XfXv"
"_id": "05Y7nVpG9Cxb0lYGrktJFq"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "number", "_name": "number",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 45 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 63 "__id__": 65
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3095,7 +3180,7 @@ ...@@ -3095,7 +3180,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 44.49, "width": 22.25,
"height": 50.4 "height": 50.4
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -3107,7 +3192,7 @@ ...@@ -3107,7 +3192,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
236, -65,
820, 820,
0, 0,
0, 0,
...@@ -3130,14 +3215,14 @@ ...@@ -3130,14 +3215,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "f8vsOtA2NNAazXTOdFFHt7" "_id": "1b41WA4VROFp4aIDlgPpnY"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 62 "__id__": 64
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3147,8 +3232,8 @@ ...@@ -3147,8 +3232,8 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "15", "_string": "7",
"_N$string": "15", "_N$string": "7",
"_fontSize": 40, "_fontSize": 40,
"_lineHeight": 40, "_lineHeight": 40,
"_enableWrapText": true, "_enableWrapText": true,
...@@ -3163,85 +3248,20 @@ ...@@ -3163,85 +3248,20 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "daf5gK9sZOqbOigBywo6Qp" "_id": "08xjxm5GFJJ7n294vYTyNy"
},
{
"__type__": "cc.Node",
"_name": "row",
"_objFlags": 0,
"_parent": {
"__id__": 14
},
"_children": [
{
"__id__": 65
},
{
"__id__": 67
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_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": "09VsFdn6pJgpQlrgYTiiJQ"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "right", "_name": "number",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 64 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 66 "__id__": 67
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3255,8 +3275,8 @@ ...@@ -3255,8 +3275,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 205, "width": 44.49,
"height": 165 "height": 50.4
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -3267,8 +3287,8 @@ ...@@ -3267,8 +3287,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 80,
110, 820,
0, 0,
0, 0,
0, 0,
...@@ -3290,14 +3310,14 @@ ...@@ -3290,14 +3310,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "25XM4ouxhHN6nrqUhPOC/e" "_id": "87HHcjBCxFn74NsvChwI5I"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 65 "__id__": 66
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3307,36 +3327,34 @@ ...@@ -3307,36 +3327,34 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_string": "10",
"__uuid__": "f61ac33c-f363-4ffd-a868-fcfc6b0e94fe" "_N$string": "10",
}, "_fontSize": 40,
"_type": 0, "_lineHeight": 40,
"_sizeMode": 1, "_enableWrapText": true,
"_fillType": 0, "_N$file": null,
"_fillCenter": { "_isSystemFontUsed": true,
"__type__": "cc.Vec2", "_spacingX": 0,
"x": 0, "_batchAsBitmap": false,
"y": 0 "_styleFlags": 0,
}, "_underlineHeight": 0,
"_fillStart": 0, "_N$horizontalAlign": 1,
"_fillRange": 0, "_N$verticalAlign": 1,
"_isTrimmedMode": true, "_N$fontFamily": "Arial",
"_atlas": null, "_N$overflow": 0,
"_id": "70pePch5pH05vhaXn/Ra67" "_N$cacheMode": 0,
"_id": "05Y7nVpG9Cxb0lYGrktJFq"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "mistake", "_name": "number",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 64 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{
"__id__": 68
},
{ {
"__id__": 69 "__id__": 69
} }
...@@ -3352,8 +3370,8 @@ ...@@ -3352,8 +3370,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 168, "width": 44.49,
"height": 165 "height": 50.4
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -3364,8 +3382,8 @@ ...@@ -3364,8 +3382,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 236,
110, 820,
0, 0,
0, 0,
0, 0,
...@@ -3387,14 +3405,14 @@ ...@@ -3387,14 +3405,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "29yFlPgTVI/YlO9pIGYct+" "_id": "f8vsOtA2NNAazXTOdFFHt7"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 67 "__id__": 68
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3404,41 +3422,23 @@ ...@@ -3404,41 +3422,23 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_string": "15",
"__uuid__": "171e9395-7887-4681-b4ff-c10c66c1ac67" "_N$string": "15",
}, "_fontSize": 40,
"_type": 0, "_lineHeight": 40,
"_sizeMode": 1, "_enableWrapText": true,
"_fillType": 0, "_N$file": null,
"_fillCenter": { "_isSystemFontUsed": true,
"__type__": "cc.Vec2", "_spacingX": 0,
"x": 0, "_batchAsBitmap": false,
"y": 0 "_styleFlags": 0,
}, "_underlineHeight": 0,
"_fillStart": 0, "_N$horizontalAlign": 1,
"_fillRange": 0, "_N$verticalAlign": 1,
"_isTrimmedMode": false, "_N$fontFamily": "Arial",
"_atlas": null, "_N$overflow": 0,
"_id": "75Uao8F8dLA4vz+1Go/A44" "_N$cacheMode": 0,
}, "_id": "daf5gK9sZOqbOigBywo6Qp"
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 67
},
"_enabled": true,
"_clip": {
"__uuid__": "82573ceb-7132-4a68-980e-355366e393ef"
},
"_volume": 1,
"_mute": false,
"_loop": true,
"_firstlyEnabled": true,
"playOnLoad": true,
"preload": true,
"_id": "9eLbH6gqxLgKKBwTgFYzux"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
......
...@@ -35,6 +35,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -35,6 +35,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async onLoadEnd() { async onLoadEnd() {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考 // TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initSysteam();
this.initData(); this.initData();
this.initView(); this.initView();
this.initListener(); this.initListener();
...@@ -44,9 +45,20 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -44,9 +45,20 @@ export default class SceneComponent extends MyCocosSceneComponent {
}) })
pg.event.emit('npc_layer_back_init', this.data) pg.event.emit('npc_layer_back_init', this.data)
} }
initSysteam() {
console.log("调用竖版")
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
courseware && courseware.onConfigurationPortrait()
} else {
courseware && courseware.onConfigurationPortrait()
}
}
protected onDestroy(): void {
pg.event.clear();
courseware.onConfigurationLandscape()
}
_cantouch = null; _cantouch = null;
private item_question: cc.Node
//题目id //题目id
private currentId: number private currentId: number
//总时间时间 //总时间时间
...@@ -59,6 +71,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -59,6 +71,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private layer_game: cc.Node; private layer_game: cc.Node;
// 准备开始 // 准备开始
private layout_begin: cc.Node; private layout_begin: cc.Node;
private layout_question: cc.Node;
initData() { initData() {
// 所有全局变量 默认都是null // 所有全局变量 默认都是null
this._cantouch = true; this._cantouch = true;
...@@ -67,11 +80,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -67,11 +80,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
initView() { initView() {
// 取对象 // 取对象
/* this.item_question = pg.view.find(this, 'item_question'); */
this.layer_game = pg.view.find(this, 'layer_game'); this.layer_game = pg.view.find(this, 'layer_game');
this.layout_begin = pg.view.find(this.layer_game, 'layout_begin'); this.layout_begin = pg.view.find(this.layer_game, 'layout_begin');
this.layout_question = pg.view.find(this.layer_game, 'layout_question');
pg.view.visible(pg.view.find(this.layer_game, 'countdown/countdown1'), true); pg.view.visible(pg.view.find(this.layer_game, 'countdown/countdown1'), true);
pg.view.visible(pg.view.find(this.layer_game, 'countdown/countdown2'), false); pg.view.visible(pg.view.find(this.layer_game, 'countdown/countdown2'), false);
let item_question = pg.view.find(this, 'layer_game/item_question');
pg.view.visible(item_question, false);
} }
initListener() { initListener() {
...@@ -140,6 +155,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -140,6 +155,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
//----------------------Question------------------------------------ //----------------------Question------------------------------------
private currentTime: number; private currentTime: number;
private currentItemQuestion: cc.Node;
private nextItemQuestion: cc.Node;
startQuestion() { startQuestion() {
// 游戏所需的初始化数据 // 游戏所需的初始化数据
this.currentId = 0 this.currentId = 0
...@@ -149,15 +166,28 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -149,15 +166,28 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.right = 0 this.right = 0
this.gameStart = true; this.gameStart = true;
this.state = State.Recording; this.state = State.Recording;
this.currentItemQuestion = this.createQuestionItem(cc.v2(0, 50));
this.updateQuestion(); this.updateQuestion();
this.updateProgress(); this.updateProgress();
} }
createQuestionItem(pos) {
let item_question = pg.view.find(this, 'layer_game/item_question');
let clone_question = pg.view.clone(item_question);
clone_question.active = true;
clone_question.x = pos.x;
clone_question.y = pos.y;
this.layout_question.addChild(clone_question);
return clone_question;
}
//题目 //题目
updateQuestion() { updateQuestion() {
let item_question = pg.view.find(this, 'layer_game/item_question'); let itemQuestion = this.currentItemQuestion;
let data = this.getCurrent(); let data = this.getCurrent();
pg.view.setNetImg(pg.view.find(item_question, "img"), data.image, { w: 700, h: 360 }) pg.view.setNetImg(pg.view.find(itemQuestion, "img"), data.image, { w: 700, h: 360 })
pg.view.setString(pg.view.find(item_question, "text"), data.text) pg.view.setString(pg.view.find(itemQuestion, "text"), data.text)
} }
//------------------------------Loop---------------------------------- //------------------------------Loop----------------------------------
...@@ -210,13 +240,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -210,13 +240,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
//用户回答结果 //用户回答结果
checkRight(score) { checkRight(score) {
let isRight = score > 40; let isRight = score > 40;
let item_question = pg.view.find(this, 'layer_game/item_question');
/* /*
* answer 获取的用户答案 * answer 获取的用户答案
*/ */
//判断对错 //判断对错
let row = pg.view.find(this, 'layer_game/row'); let currentItemQuestion = this.currentItemQuestion;
item_question.children[2].active = true let row = pg.view.find(currentItemQuestion, 'row');
currentItemQuestion.children[2].active = true
//正确 //正确
if (isRight) { if (isRight) {
//正确后执行函数 //正确后执行函数
...@@ -240,14 +270,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -240,14 +270,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
hideAnswer() { hideAnswer() {
let item_question = pg.view.find(this, 'layer_game/item_question'); console.log("节点移出画面")
let row = pg.view.find(this, 'layer_game/row'); let currentItemQuestion = this.currentItemQuestion;
let row = pg.view.find(currentItemQuestion, 'row');
let right = pg.view.find(row, 'right'); let right = pg.view.find(row, 'right');
let mistake = pg.view.find(row, 'mistake'); let mistake = pg.view.find(row, 'mistake');
let text = pg.view.find(item_question, 'text');
right.active = false right.active = false
mistake.active = false mistake.active = false
text.active = false
} }
//------------------------------Record---------------------------------- //------------------------------Record----------------------------------
......
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