Commit 79617c0a authored by Tt's avatar Tt

1

parent 3f9d8885
......@@ -96,25 +96,25 @@
"__id__": 113
},
{
"__id__": 150
"__id__": 146
},
{
"__id__": 163
"__id__": 159
},
{
"__id__": 175
"__id__": 171
}
],
"_active": true,
"_components": [
{
"__id__": 196
"__id__": 192
},
{
"__id__": 197
"__id__": 193
},
{
"__id__": 198
"__id__": 194
}
],
"_prefab": null,
......@@ -5615,10 +5615,10 @@
"__id__": 119
},
{
"__id__": 129
"__id__": 131
},
{
"__id__": 132
"__id__": 133
},
{
"__id__": 135
......@@ -5634,18 +5634,12 @@
},
{
"__id__": 143
},
{
"__id__": 145
},
{
"__id__": 147
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 149
"__id__": 145
}
],
"_prefab": null,
......@@ -5933,12 +5927,15 @@
},
{
"__id__": 126
},
{
"__id__": 128
}
],
"_active": true,
"_components": [
{
"__id__": 128
"__id__": 130
}
],
"_prefab": null,
......@@ -6366,53 +6363,18 @@
"_N$cacheMode": 0,
"_id": "9dhkE7tNFHUa0HW9v2NTCt"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "649bfca6-aeb7-476c-87ba-5652af515145"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "62G2jd0j5H3L4wBwBXnHcO"
},
{
"__type__": "cc.Node",
"_name": "btn_start",
"_name": "label_progress",
"_objFlags": 0,
"_parent": {
"__id__": 113
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 130
},
{
"__id__": 131
"__id__": 129
}
],
"_prefab": null,
......@@ -6426,8 +6388,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 279,
"height": 101
"width": 55.61,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6438,8 +6400,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
320,
-290,
-8.846,
296.77,
0,
0,
0,
......@@ -6461,14 +6423,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "f9nQr/UsFA7YoDWlOh6Fq+"
"_id": "c2Fc3jCtRDt76xEDDJzCkm"
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 128
},
"_enabled": true,
"_materials": [
......@@ -6478,162 +6440,30 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b07d8d86-6a31-4339-9bc9-49b73564a191"
},
"_type": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_atlas": null,
"_id": "e2gazsORhPy533fgM+vOw+"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "175w948qpA07EDkq23b6o+"
},
{
"__type__": "cc.Node",
"_name": "btn_stop",
"_objFlags": 0,
"_parent": {
"__id__": 113
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 133
},
{
"__id__": 134
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 279,
"height": 101
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
320,
-290,
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": "7a3SC9sMxKdbdtRzAILdPG"
"_string": "0/0",
"_N$string": "0/0",
"_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": "159GN8eW5AE5/Bmtfexuf0"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132
"__id__": 119
},
"_enabled": true,
"_materials": [
......@@ -6644,10 +6474,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "88328a76-e2de-431d-a716-b170c608a80a"
"__uuid__": "649bfca6-aeb7-476c-87ba-5652af515145"
},
"_type": 0,
"_sizeMode": 2,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -6656,81 +6486,13 @@
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "03udlMmwtLsJiZCENUmasi"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "63JQ9xO+hImrF12OcsjKRt"
"_id": "62G2jd0j5H3L4wBwBXnHcO"
},
{
"__type__": "cc.Node",
"_name": "btn_record",
"_name": "btn_start",
"_objFlags": 0,
"_parent": {
"__id__": 113
......@@ -6739,7 +6501,7 @@
"_active": true,
"_components": [
{
"__id__": 136
"__id__": 132
}
],
"_prefab": null,
......@@ -6795,7 +6557,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 131
},
"_enabled": true,
"_materials": [
......@@ -6824,7 +6586,7 @@
},
{
"__type__": "cc.Node",
"_name": "btn_record_reset",
"_name": "btn_start_reset",
"_objFlags": 0,
"_parent": {
"__id__": 113
......@@ -6833,7 +6595,7 @@
"_active": true,
"_components": [
{
"__id__": 138
"__id__": 134
}
],
"_prefab": null,
......@@ -6889,7 +6651,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
"__id__": 133
},
"_enabled": true,
"_materials": [
......@@ -6927,7 +6689,7 @@
"_active": true,
"_components": [
{
"__id__": 140
"__id__": 136
}
],
"_prefab": null,
......@@ -6983,7 +6745,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 139
"__id__": 135
},
"_enabled": true,
"_materials": [
......@@ -7021,7 +6783,7 @@
"_active": true,
"_components": [
{
"__id__": 142
"__id__": 138
}
],
"_prefab": null,
......@@ -7077,7 +6839,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 141
"__id__": 137
},
"_enabled": true,
"_materials": [
......@@ -7115,7 +6877,7 @@
"_active": true,
"_components": [
{
"__id__": 144
"__id__": 140
}
],
"_prefab": null,
......@@ -7171,7 +6933,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 143
"__id__": 139
},
"_enabled": true,
"_materials": [
......@@ -7209,7 +6971,7 @@
"_active": true,
"_components": [
{
"__id__": 146
"__id__": 142
}
],
"_prefab": null,
......@@ -7265,7 +7027,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 145
"__id__": 141
},
"_enabled": true,
"_materials": [
......@@ -7303,7 +7065,7 @@
"_active": true,
"_components": [
{
"__id__": 148
"__id__": 144
}
],
"_prefab": null,
......@@ -7359,7 +7121,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 147
"__id__": 143
},
"_enabled": true,
"_materials": [
......@@ -7422,25 +7184,25 @@
},
"_children": [
{
"__id__": 151
"__id__": 147
},
{
"__id__": 154
"__id__": 150
},
{
"__id__": 156
"__id__": 152
},
{
"__id__": 158
"__id__": 154
},
{
"__id__": 160
"__id__": 156
}
],
"_active": false,
"_components": [
{
"__id__": 162
"__id__": 158
}
],
"_prefab": null,
......@@ -7496,16 +7258,16 @@
"_name": "gray",
"_objFlags": 0,
"_parent": {
"__id__": 150
"__id__": 146
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 152
"__id__": 148
},
{
"__id__": 153
"__id__": 149
}
],
"_prefab": null,
......@@ -7561,7 +7323,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 151
"__id__": 147
},
"_enabled": true,
"_materials": [
......@@ -7593,7 +7355,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 151
"__id__": 147
},
"_enabled": true,
"alignMode": 1,
......@@ -7620,13 +7382,13 @@
"_name": "Comeon",
"_objFlags": 0,
"_parent": {
"__id__": 150
"__id__": 146
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 155
"__id__": 151
}
],
"_prefab": null,
......@@ -7682,7 +7444,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 154
"__id__": 150
},
"_enabled": true,
"_materials": [
......@@ -7722,13 +7484,13 @@
"_name": "Excellent",
"_objFlags": 0,
"_parent": {
"__id__": 150
"__id__": 146
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 157
"__id__": 153
}
],
"_prefab": null,
......@@ -7784,7 +7546,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 156
"__id__": 152
},
"_enabled": true,
"_materials": [
......@@ -7824,13 +7586,13 @@
"_name": "Nice",
"_objFlags": 0,
"_parent": {
"__id__": 150
"__id__": 146
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 159
"__id__": 155
}
],
"_prefab": null,
......@@ -7886,7 +7648,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 158
"__id__": 154
},
"_enabled": true,
"_materials": [
......@@ -7926,13 +7688,13 @@
"_name": "Tryagain",
"_objFlags": 0,
"_parent": {
"__id__": 150
"__id__": 146
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 161
"__id__": 157
}
],
"_prefab": null,
......@@ -7988,7 +7750,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 160
"__id__": 156
},
"_enabled": true,
"_materials": [
......@@ -8028,7 +7790,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 150
"__id__": 146
},
"_enabled": true,
"alignMode": 1,
......@@ -8059,19 +7821,19 @@
},
"_children": [
{
"__id__": 164
"__id__": 160
},
{
"__id__": 166
"__id__": 162
},
{
"__id__": 168
"__id__": 164
},
{
"__id__": 170
"__id__": 166
},
{
"__id__": 173
"__id__": 169
}
],
"_active": false,
......@@ -8129,13 +7891,13 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 163
"__id__": 159
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 165
"__id__": 161
}
],
"_prefab": null,
......@@ -8191,7 +7953,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 164
"__id__": 160
},
"_enabled": true,
"_materials": [
......@@ -8223,13 +7985,13 @@
"_name": "bg_instructions",
"_objFlags": 0,
"_parent": {
"__id__": 163
"__id__": 159
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 167
"__id__": 163
}
],
"_prefab": null,
......@@ -8285,7 +8047,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 166
"__id__": 162
},
"_enabled": true,
"_materials": [
......@@ -8317,13 +8079,13 @@
"_name": "desc",
"_objFlags": 0,
"_parent": {
"__id__": 163
"__id__": 159
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 169
"__id__": 165
}
],
"_prefab": null,
......@@ -8379,7 +8141,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 168
"__id__": 164
},
"_enabled": true,
"_materials": [
......@@ -8414,16 +8176,16 @@
"_name": "btn_start",
"_objFlags": 0,
"_parent": {
"__id__": 163
"__id__": 159
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 171
"__id__": 167
},
{
"__id__": 172
"__id__": 168
}
],
"_prefab": null,
......@@ -8479,7 +8241,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 170
"__id__": 166
},
"_enabled": true,
"_materials": [
......@@ -8511,7 +8273,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 170
"__id__": 166
},
"_enabled": true,
"_normalMaterial": null,
......@@ -8572,7 +8334,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 170
"__id__": 166
},
"_id": "7095HuemhJQ40wHbz5jlAy"
},
......@@ -8581,13 +8343,13 @@
"_name": "touch",
"_objFlags": 0,
"_parent": {
"__id__": 163
"__id__": 159
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 174
"__id__": 170
}
],
"_prefab": null,
......@@ -8643,7 +8405,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 173
"__id__": 169
},
"_enabled": true,
"_normalMaterial": null,
......@@ -8714,6 +8476,9 @@
"__id__": 2
},
"_children": [
{
"__id__": 172
},
{
"__id__": 176
},
......@@ -8725,9 +8490,6 @@
},
{
"__id__": 188
},
{
"__id__": 192
}
],
"_active": false,
......@@ -8785,11 +8547,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 175
"__id__": 171
},
"_children": [
{
"__id__": 177
"__id__": 173
}
],
"_active": true,
......@@ -8847,11 +8609,11 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 176
"__id__": 172
},
"_children": [
{
"__id__": 178
"__id__": 174
}
],
"_active": true,
......@@ -8909,13 +8671,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 177
"__id__": 173
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 179
"__id__": 175
}
],
"_prefab": null,
......@@ -8971,7 +8733,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 178
"__id__": 174
},
"_enabled": true,
"_materials": [
......@@ -9001,11 +8763,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 175
"__id__": 171
},
"_children": [
{
"__id__": 181
"__id__": 177
}
],
"_active": true,
......@@ -9063,11 +8825,11 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 180
"__id__": 176
},
"_children": [
{
"__id__": 182
"__id__": 178
}
],
"_active": true,
......@@ -9125,13 +8887,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 181
"__id__": 177
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 183
"__id__": 179
}
],
"_prefab": null,
......@@ -9187,7 +8949,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 182
"__id__": 178
},
"_enabled": true,
"_materials": [
......@@ -9217,11 +8979,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 175
"__id__": 171
},
"_children": [
{
"__id__": 185
"__id__": 181
}
],
"_active": true,
......@@ -9279,11 +9041,11 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 180
},
"_children": [
{
"__id__": 186
"__id__": 182
}
],
"_active": true,
......@@ -9341,13 +9103,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 185
"__id__": 181
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 187
"__id__": 183
}
],
"_prefab": null,
......@@ -9403,7 +9165,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 186
"__id__": 182
},
"_enabled": true,
"_materials": [
......@@ -9433,11 +9195,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 175
"__id__": 171
},
"_children": [
{
"__id__": 189
"__id__": 185
}
],
"_active": true,
......@@ -9495,11 +9257,11 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 188
"__id__": 184
},
"_children": [
{
"__id__": 190
"__id__": 186
}
],
"_active": true,
......@@ -9557,13 +9319,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 189
"__id__": 185
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 191
"__id__": 187
}
],
"_prefab": null,
......@@ -9619,7 +9381,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 190
"__id__": 186
},
"_enabled": true,
"_materials": [
......@@ -9649,11 +9411,11 @@
"_name": "quadBase",
"_objFlags": 0,
"_parent": {
"__id__": 175
"__id__": 171
},
"_children": [
{
"__id__": 193
"__id__": 189
}
],
"_active": true,
......@@ -9711,11 +9473,11 @@
"_name": "quad",
"_objFlags": 0,
"_parent": {
"__id__": 192
"__id__": 188
},
"_children": [
{
"__id__": 194
"__id__": 190
}
],
"_active": true,
......@@ -9773,13 +9535,13 @@
"_name": "paper",
"_objFlags": 0,
"_parent": {
"__id__": 193
"__id__": 189
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 195
"__id__": 191
}
],
"_prefab": null,
......@@ -9835,7 +9597,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 194
"__id__": 190
},
"_enabled": true,
"_materials": [
......@@ -9916,7 +9678,7 @@
"__id__": 34
},
"layout_tip": {
"__id__": 150
"__id__": 146
},
"layout_speak": {
"__id__": 113
......
......@@ -222,6 +222,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 播放背景音乐
pg.audio.playBgAudioByUrl(Game.getIns().bgAudio);
this.layout_speak.active = false;
// 显示问题
this.showPage();
......@@ -417,12 +420,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 切换到持续喷水动画
pg.view.addDBAnimationCallback(this.node_firetruck_flush, null)
pg.view.playDBAnimation(this.node_firetruck_flush, '持续喷水', 1);
pg.view.addDBAnimationCallback(this.node_firetruck_flush, () => {
pg.view.addDBAnimationCallback(this.node_firetruck_flush, null)
this.node_firetruck_flush.active = false;
})
pg.view.playDBAnimation(this.node_firetruck_flush, '收水', 1);
this.touching = false;
this.showCard();
})
pg.view.playDBAnimation(this.node_firetruck_flush, '喷水', 1);
......@@ -455,6 +452,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.log(`找不到节点: water_${fireIndex}`);
}
pg.view.addDBAnimationCallback(this.node_firetruck_flush, () => {
pg.view.addDBAnimationCallback(this.node_firetruck_flush, null)
this.node_firetruck_flush.active = false;
})
pg.view.playDBAnimation(this.node_firetruck_flush, '收水', 1);
this.touching = false;
// 检查当前页面是否所有火苗都已处理完毕
if (this.activeFireNodes.length === 0) {
// 延迟一段时间后检查是否需要切换到下一页
......@@ -483,33 +487,27 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.showPage();
}
showCard() {
showCard(hide: boolean = false) {
if (!hide) {
// 显示卡片
const currentData = this.currentFireNode.data;
console.log('showCard', currentData)
}
/**
* 更新录音界面的显示状态
* @param hide 是否隐藏录音界面
*/
private updateLayoutSpeak(hide?: boolean) {
if (!hide) {
// 显示录音界面
this.layout_speak.active = true;
// 获取UI元素
let ske = pg.view.find(this.layout_speak, 'speak_ske');
let btn_start = pg.view.find(this.layout_speak, 'btn_start');
let btn_start_reset = pg.view.find(this.layout_speak, 'btn_start_reset');
let btn_stop = pg.view.find(this.layout_speak, 'btn_stop');
let btn_record_replay = pg.view.find(this.layout_speak, 'btn_record_replay');
let btn_record_0 = pg.view.find(this.layout_speak, 'btn_record_0');
let btn_record_1 = pg.view.find(this.layout_speak, 'btn_record_1');
let btn_record_2 = pg.view.find(this.layout_speak, 'btn_record_2');
// 绑定按钮事件
pg.view.touchOn(btn_start, this.onTouchRecord, this);
pg.view.touchOn(btn_start_reset, this.onTouchRecord, this);
pg.view.touchOn(btn_stop, this.onTouchRecordEnd, this);
// 设置动画初始状态(几乎静止)
pg.view.playDBAnimation(ske, 'newAnimation', 0);
ske.getComponent(dragonBones.ArmatureDisplay).timeScale = 0.00001;
pg.view.touchOn(btn_record_replay, this.onTouchPlayRecord, this);
// 显示开始按钮,隐藏停止按钮
btn_start.active = true;
......@@ -714,6 +712,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.recrodEnd(data);
}); //结束录音
}
onTouchPlayRecord() {
const voice = Game.getIns().player.getLastVoice();
// voice.audioUrl;
if (voice) {
pg.audio.playAudioByUrl(voice.audioUrl);
}
}
/** 是否需要再次尝试 */
private tryAgain: boolean = false;
/** 是否正在触摸/操作中 */
......@@ -751,7 +758,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 延迟后隐藏卡片和提示,进入下一题
await pg.time.delay(3);
this.updateLayoutSpeak(true);
this.showCard(true);
this.updateTips(null);
this.nextEgg();
return;
......@@ -771,7 +778,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
await pg.time.delay(3);
this.updateLayoutSpeak(true);
this.showCard(true);
this.updateTips(null);
this.recordTouching = false;
this.nextEgg();
......@@ -797,10 +804,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 根据是否需要再次尝试决定显示卡片或进入下一题
if (this.tryAgain) {
// 需要再次尝试,显示卡片和录音界面
this.updateLayoutSpeak()
this.showCard()
} else {
// 不需要再次尝试,隐藏卡片和录音界面
this.updateLayoutSpeak(true)
this.showCard(true)
this.recordTouching = false;
}
}
......
......@@ -88,6 +88,9 @@ class Role {
addVoice(obj: any) {
this.voices.push(obj);
}
getLastVoice(){
return this.voices[this.voices.length - 1];
}
}
/**
* 玩家类,继承自角色基类
......
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