Commit 1c574bd9 authored by Nguyễn Quang Sáng's avatar Nguyễn Quang Sáng

12/10/23 commit

parent 1b412c27
{
"ver": "1.1.3",
"uuid": "f40bca90-2f85-490b-9613-bcf82a5d8ba4",
"importer": "folder",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "e493052e-b9c3-4753-8674-b1cc62c4f606",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 2.037551,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "063ab77e-6b30-472f-a272-120cbdea50bd",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 0.574694,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "fba914dc-ac06-4b40-8e63-c8eb45886975",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.358367,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "2c1156f8-3b0c-4423-ac33-85809c809fb3",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 0.574694,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "104a99ce-77cf-4bb3-a9ea-f24a46bfb730",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 0.548571,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "add104f7-f544-4441-93d2-6fcbbb820177",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 0.626939,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "5c67484a-9d75-483b-9f0f-f14251a4f746",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 2.533878,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "ffa29f64-c9e9-4ce7-a0fe-35b5d686cc3a",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.436735,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "55041368-92ed-4b1d-a51a-1ef92eae884d",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 2.66449,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "0161dfda-4453-4e19-a72d-424bc8e3620f",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 0.235102,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "68796e51-e944-40b4-9d51-ff47c67641d4",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.332245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "6c32cd91-c4a7-4d9b-8ada-f236adc91bc0",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.332245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "52ee7efb-0e38-47e5-a3d5-751d234d3a2c",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.332245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "24f23cdb-5fc8-46e2-bf2a-37ff41b78e9f",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.332245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "b221be45-8e0c-4142-a50d-71ed9038f22e",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.332245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "bdac315e-8d1b-406b-ac7c-ef42306fc793",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.332245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "909a37a1-5c39-45c0-8b79-2853153e107d",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.332245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "566a47ca-fd19-4d7d-be78-ec0cc83a8660",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.332245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "c78dfab2-1b3a-46f5-8057-a39c553f75f5",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.332245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "21682b16-9924-4e7f-ac81-1be85d924a36",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 0.10449,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "b12c902a-9d7e-4073-8005-6c79d2492e7e",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 8.045714,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "9522f732-829c-456f-a64e-ec79d14ce403",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 2.612245,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "7d5dd4f7-4615-4e32-8c4b-0f931b8b7e95",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.724082,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "3b829faf-db4f-4722-acdc-c000be5cd603",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 3.526531,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.3",
"uuid": "5980fabc-2201-4b66-b917-632e80d0b961",
"importer": "audio-clip",
"downloadMode": 0,
"duration": 1.436735,
"subMetas": {}
}
\ No newline at end of file
......@@ -78,13 +78,13 @@
"__id__": 54
},
{
"__id__": 279
"__id__": 282
},
{
"__id__": 57
},
{
"__id__": 281
"__id__": 284
},
{
"__id__": 8
......@@ -108,19 +108,19 @@
"__id__": 156
},
{
"__id__": 190
"__id__": 192
},
{
"__id__": 237
"__id__": 240
}
],
"_active": true,
"_components": [
{
"__id__": 283
"__id__": 286
},
{
"__id__": 284
"__id__": 287
}
],
"_prefab": null,
......@@ -282,6 +282,9 @@
},
{
"__id__": 64
},
{
"__id__": 169
}
],
"_active": true,
......@@ -423,13 +426,16 @@
"__id__": 95
},
"nextBlockSpf": {
"__id__": 179
"__id__": 181
},
"shadow": {
"__id__": 154
},
"gameOverScreen": {
"__id__": 190
"__id__": 192
},
"soundsController": {
"__id__": 168
},
"_id": "3fQVty34VNO4exzcgIvAU2"
},
......@@ -3062,7 +3068,7 @@
},
"_enabled": true,
"highScoreLbl": {
"__id__": 172
"__id__": 174
},
"_id": "d8Bv+5C0pLG6PE5Rjyn81l"
},
......@@ -3077,7 +3083,7 @@
"_active": true,
"_components": [
{
"__id__": 189
"__id__": 191
},
{
"__id__": 55
......@@ -3142,9 +3148,6 @@
{
"__id__": 58
},
{
"__id__": 168
},
{
"__id__": 170
},
......@@ -3155,16 +3158,19 @@
"__id__": 174
},
{
"__id__": 56
"__id__": 176
},
{
"__id__": 176
"__id__": 56
},
{
"__id__": 178
},
{
"__id__": 182
"__id__": 180
},
{
"__id__": 184
}
],
"_active": true,
......@@ -3588,6 +3594,9 @@
"destroyBlockPopUp": {
"__id__": 161
},
"soundsController": {
"__id__": 168
},
"_id": "2cdM3LFE9AAI82qX2pNxpL"
},
{
......@@ -4460,7 +4469,7 @@
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "2b6115a2-5876-4aee-bb6f-e7b56ffdc7c4"
"__uuid__": "89306fe6-7b03-4ec8-a19a-68caafdc5504"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
......@@ -4489,7 +4498,7 @@
"b": 0,
"a": 255
},
"_width": 1,
"_width": 2,
"_id": "ddMOpfD4VKPqI9uOErtRlh"
},
{
......@@ -6025,7 +6034,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 41,
"width": 34,
"height": 34
},
"_anchorPoint": {
......@@ -7110,7 +7119,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 41,
"width": 34,
"height": 34
},
"_anchorPoint": {
......@@ -8363,6 +8372,157 @@
"playOnLoad": false,
"_id": "1dVdGT0kJNtaWtbediAojy"
},
{
"__type__": "15214VHwmBHr68W9KCHkGmu",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 169
},
"_enabled": true,
"sounds": [
{
"__uuid__": "e493052e-b9c3-4753-8674-b1cc62c4f606"
},
{
"__uuid__": "063ab77e-6b30-472f-a272-120cbdea50bd"
},
{
"__uuid__": "fba914dc-ac06-4b40-8e63-c8eb45886975"
},
{
"__uuid__": "2c1156f8-3b0c-4423-ac33-85809c809fb3"
},
{
"__uuid__": "104a99ce-77cf-4bb3-a9ea-f24a46bfb730"
},
{
"__uuid__": "add104f7-f544-4441-93d2-6fcbbb820177"
},
{
"__uuid__": "5c67484a-9d75-483b-9f0f-f14251a4f746"
},
{
"__uuid__": "ffa29f64-c9e9-4ce7-a0fe-35b5d686cc3a"
},
{
"__uuid__": "55041368-92ed-4b1d-a51a-1ef92eae884d"
},
{
"__uuid__": "0161dfda-4453-4e19-a72d-424bc8e3620f"
},
{
"__uuid__": "c78dfab2-1b3a-46f5-8057-a39c553f75f5"
},
{
"__uuid__": "21682b16-9924-4e7f-ac81-1be85d924a36"
},
{
"__uuid__": "b12c902a-9d7e-4073-8005-6c79d2492e7e"
},
{
"__uuid__": "9522f732-829c-456f-a64e-ec79d14ce403"
},
{
"__uuid__": "7d5dd4f7-4615-4e32-8c4b-0f931b8b7e95"
},
{
"__uuid__": "3b829faf-db4f-4722-acdc-c000be5cd603"
},
{
"__uuid__": "5980fabc-2201-4b66-b917-632e80d0b961"
}
],
"soundsMerge": [
{
"__uuid__": "68796e51-e944-40b4-9d51-ff47c67641d4"
},
{
"__uuid__": "6c32cd91-c4a7-4d9b-8ada-f236adc91bc0"
},
{
"__uuid__": "52ee7efb-0e38-47e5-a3d5-751d234d3a2c"
},
{
"__uuid__": "24f23cdb-5fc8-46e2-bf2a-37ff41b78e9f"
},
{
"__uuid__": "b221be45-8e0c-4142-a50d-71ed9038f22e"
},
{
"__uuid__": "bdac315e-8d1b-406b-ac7c-ef42306fc793"
},
{
"__uuid__": "909a37a1-5c39-45c0-8b79-2853153e107d"
},
{
"__uuid__": "566a47ca-fd19-4d7d-be78-ec0cc83a8660"
}
],
"_id": "22e9wYHjZBQItJhkdWI1ap"
},
{
"__type__": "cc.Node",
"_name": "SoundsController",
"_objFlags": 0,
"_parent": {
"__id__": 5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 168
}
],
"_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": "9415HGiZBDz585Uge7on+Q"
},
{
"__type__": "cc.Node",
"_name": "HighestBar",
......@@ -8374,7 +8534,7 @@
"_active": true,
"_components": [
{
"__id__": 169
"__id__": 171
}
],
"_prefab": null,
......@@ -8430,7 +8590,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 168
"__id__": 170
},
"_enabled": true,
"_materials": [
......@@ -8468,7 +8628,7 @@
"_active": true,
"_components": [
{
"__id__": 171
"__id__": 173
}
],
"_prefab": null,
......@@ -8524,7 +8684,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 170
"__id__": 172
},
"_enabled": true,
"_materials": [
......@@ -8562,7 +8722,7 @@
"_active": true,
"_components": [
{
"__id__": 173
"__id__": 175
}
],
"_prefab": null,
......@@ -8618,7 +8778,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 172
"__id__": 174
},
"_enabled": true,
"_materials": [
......@@ -8659,7 +8819,7 @@
"_active": true,
"_components": [
{
"__id__": 175
"__id__": 177
}
],
"_prefab": null,
......@@ -8715,7 +8875,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 174
"__id__": 176
},
"_enabled": true,
"_materials": [
......@@ -8753,22 +8913,22 @@
"_active": true,
"_components": [
{
"__id__": 177
"__id__": 179
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 131,
"g": 135,
"b": 221,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 65.48,
"height": 31.5
"width": 53.94,
"height": 25.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -8780,7 +8940,7 @@
"ctor": "Float64Array",
"array": [
15.953,
444.965,
437.075,
0,
0,
0,
......@@ -8809,7 +8969,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 176
"__id__": 178
},
"_enabled": true,
"_materials": [
......@@ -8821,11 +8981,11 @@
"_dstBlendFactor": 771,
"_string": "NEXT",
"_N$string": "NEXT",
"_fontSize": 25,
"_fontSize": 20,
"_lineHeight": 0,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "6f0d4d99-b207-4755-9233-a2544dc7a038"
"__uuid__": "2b6115a2-5876-4aee-bb6f-e7b56ffdc7c4"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
......@@ -8848,13 +9008,13 @@
},
"_children": [
{
"__id__": 179
"__id__": 181
}
],
"_active": true,
"_components": [
{
"__id__": 181
"__id__": 183
}
],
"_prefab": null,
......@@ -8910,13 +9070,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 178
"__id__": 180
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 180
"__id__": 182
}
],
"_prefab": null,
......@@ -8972,7 +9132,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 179
"__id__": 181
},
"_enabled": true,
"_materials": [
......@@ -9004,7 +9164,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 178
"__id__": 180
},
"_enabled": true,
"_materials": [
......@@ -9040,19 +9200,19 @@
},
"_children": [
{
"__id__": 183
"__id__": 185
},
{
"__id__": 185
"__id__": 187
}
],
"_active": true,
"_components": [
{
"__id__": 187
"__id__": 189
},
{
"__id__": 188
"__id__": 190
}
],
"_prefab": null,
......@@ -9108,13 +9268,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 182
"__id__": 184
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 184
"__id__": 186
}
],
"_prefab": null,
......@@ -9170,7 +9330,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 183
"__id__": 185
},
"_enabled": true,
"_materials": [
......@@ -9202,13 +9362,13 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 182
"__id__": 184
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 186
"__id__": 188
}
],
"_prefab": null,
......@@ -9264,7 +9424,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 185
"__id__": 187
},
"_enabled": true,
"_materials": [
......@@ -9299,7 +9459,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 182
"__id__": 184
},
"_enabled": true,
"_materials": [
......@@ -9331,7 +9491,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 182
"__id__": 184
},
"_enabled": true,
"_normalMaterial": null,
......@@ -9437,32 +9597,32 @@
"__id__": 2
},
"_children": [
{
"__id__": 191
},
{
"__id__": 193
},
{
"__id__": 199
"__id__": 195
},
{
"__id__": 210
"__id__": 201
},
{
"__id__": 212
},
{
"__id__": 224
"__id__": 214
},
{
"__id__": 232
"__id__": 227
},
{
"__id__": 235
}
],
"_active": false,
"_components": [
{
"__id__": 236
"__id__": 239
}
],
"_prefab": null,
......@@ -9518,13 +9678,13 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 190
"__id__": 192
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 192
"__id__": 194
}
],
"_prefab": null,
......@@ -9580,7 +9740,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 191
"__id__": 193
},
"_enabled": true,
"_materials": [
......@@ -9615,20 +9775,20 @@
"_name": "CoinBar",
"_objFlags": 0,
"_parent": {
"__id__": 190
"__id__": 192
},
"_children": [
{
"__id__": 194
"__id__": 196
},
{
"__id__": 196
"__id__": 198
}
],
"_active": true,
"_components": [
{
"__id__": 198
"__id__": 200
}
],
"_prefab": null,
......@@ -9684,13 +9844,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 193
"__id__": 195
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 195
"__id__": 197
}
],
"_prefab": null,
......@@ -9746,7 +9906,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 194
"__id__": 196
},
"_enabled": true,
"_materials": [
......@@ -9778,13 +9938,13 @@
"_name": "Coin",
"_objFlags": 0,
"_parent": {
"__id__": 193
"__id__": 195
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 197
"__id__": 199
}
],
"_prefab": null,
......@@ -9840,7 +10000,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 196
"__id__": 198
},
"_enabled": true,
"_materials": [
......@@ -9875,7 +10035,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 193
"__id__": 195
},
"_enabled": true,
"_materials": [
......@@ -9907,17 +10067,17 @@
"_name": "ScoreBox",
"_objFlags": 0,
"_parent": {
"__id__": 190
"__id__": 192
},
"_children": [
{
"__id__": 200
"__id__": 202
},
{
"__id__": 202
"__id__": 204
},
{
"__id__": 206
"__id__": 208
}
],
"_active": true,
......@@ -9975,13 +10135,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 199
"__id__": 201
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 201
"__id__": 203
}
],
"_prefab": null,
......@@ -10037,7 +10197,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 200
"__id__": 202
},
"_enabled": true,
"_materials": [
......@@ -10069,17 +10229,17 @@
"_name": "HighScoreBar",
"_objFlags": 0,
"_parent": {
"__id__": 199
"__id__": 201
},
"_children": [
{
"__id__": 203
"__id__": 205
}
],
"_active": true,
"_components": [
{
"__id__": 205
"__id__": 207
}
],
"_prefab": null,
......@@ -10135,13 +10295,13 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 202
"__id__": 204
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 204
"__id__": 206
}
],
"_prefab": null,
......@@ -10197,7 +10357,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 203
"__id__": 205
},
"_enabled": true,
"_materials": [
......@@ -10232,7 +10392,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 202
"__id__": 204
},
"_enabled": true,
"_materials": [
......@@ -10264,17 +10424,17 @@
"_name": "CurrentScoreBar",
"_objFlags": 0,
"_parent": {
"__id__": 199
"__id__": 201
},
"_children": [
{
"__id__": 207
"__id__": 209
}
],
"_active": true,
"_components": [
{
"__id__": 209
"__id__": 211
}
],
"_prefab": null,
......@@ -10330,13 +10490,13 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 206
"__id__": 208
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 208
"__id__": 210
}
],
"_prefab": null,
......@@ -10392,7 +10552,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 207
"__id__": 209
},
"_enabled": true,
"_materials": [
......@@ -10427,7 +10587,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 206
"__id__": 208
},
"_enabled": true,
"_materials": [
......@@ -10459,13 +10619,13 @@
"_name": "Sprite",
"_objFlags": 0,
"_parent": {
"__id__": 190
"__id__": 192
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 211
"__id__": 213
}
],
"_prefab": null,
......@@ -10521,7 +10681,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 210
"__id__": 212
},
"_enabled": true,
"_materials": [
......@@ -10553,23 +10713,23 @@
"_name": "ReviveBtn",
"_objFlags": 0,
"_parent": {
"__id__": 190
"__id__": 192
},
"_children": [
{
"__id__": 213
"__id__": 215
},
{
"__id__": 219
"__id__": 221
}
],
"_active": true,
"_components": [
{
"__id__": 222
"__id__": 224
},
{
"__id__": 223
"__id__": 225
}
],
"_prefab": null,
......@@ -10625,20 +10785,20 @@
"_name": "PriceBar",
"_objFlags": 0,
"_parent": {
"__id__": 212
"__id__": 214
},
"_children": [
{
"__id__": 214
"__id__": 216
},
{
"__id__": 216
"__id__": 218
}
],
"_active": true,
"_components": [
{
"__id__": 218
"__id__": 220
}
],
"_prefab": null,
......@@ -10694,13 +10854,13 @@
"_name": "Price",
"_objFlags": 0,
"_parent": {
"__id__": 213
"__id__": 215
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 215
"__id__": 217
}
],
"_prefab": null,
......@@ -10756,7 +10916,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 214
"__id__": 216
},
"_enabled": true,
"_materials": [
......@@ -10791,13 +10951,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 213
"__id__": 215
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 217
"__id__": 219
}
],
"_prefab": null,
......@@ -10853,7 +11013,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 216
"__id__": 218
},
"_enabled": true,
"_materials": [
......@@ -10885,7 +11045,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 213
"__id__": 215
},
"_enabled": true,
"_materials": [
......@@ -10917,16 +11077,16 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 212
"__id__": 214
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 220
"__id__": 222
},
{
"__id__": 221
"__id__": 223
}
],
"_prefab": null,
......@@ -10982,7 +11142,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 219
"__id__": 221
},
"_enabled": true,
"_materials": [
......@@ -11017,7 +11177,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 219
"__id__": 221
},
"_enabled": true,
"_color": {
......@@ -11035,7 +11195,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 212
"__id__": 214
},
"_enabled": true,
"_materials": [
......@@ -11067,14 +11227,18 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 212
"__id__": 214
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 0.8,
"clickEvents": [],
"clickEvents": [
{
"__id__": 226
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 3,
......@@ -11130,28 +11294,38 @@
"_N$target": null,
"_id": "6dkhlpsIxPhJrrwicPliDb"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 192
},
"component": "",
"_componentId": "e6b5fzQRcZEpoF18WPNSHXS",
"handler": "onClickRevive",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "ReviveBtnAds",
"_objFlags": 0,
"_parent": {
"__id__": 190
"__id__": 192
},
"_children": [
{
"__id__": 225
"__id__": 228
},
{
"__id__": 228
"__id__": 231
}
],
"_active": true,
"_components": [
{
"__id__": 230
"__id__": 233
},
{
"__id__": 231
"__id__": 234
}
],
"_prefab": null,
......@@ -11207,16 +11381,16 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 224
"__id__": 227
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 226
"__id__": 229
},
{
"__id__": 227
"__id__": 230
}
],
"_prefab": null,
......@@ -11272,7 +11446,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 225
"__id__": 228
},
"_enabled": true,
"_materials": [
......@@ -11307,7 +11481,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 225
"__id__": 228
},
"_enabled": true,
"_color": {
......@@ -11325,13 +11499,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 224
"__id__": 227
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 229
"__id__": 232
}
],
"_prefab": null,
......@@ -11387,7 +11561,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 228
"__id__": 231
},
"_enabled": true,
"_materials": [
......@@ -11419,7 +11593,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 224
"__id__": 227
},
"_enabled": true,
"_materials": [
......@@ -11451,7 +11625,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 224
"__id__": 227
},
"_enabled": true,
"_normalMaterial": null,
......@@ -11519,16 +11693,16 @@
"_name": "IgnoreBtn",
"_objFlags": 0,
"_parent": {
"__id__": 190
"__id__": 192
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 233
"__id__": 236
},
{
"__id__": 235
"__id__": 238
}
],
"_prefab": null,
......@@ -11584,7 +11758,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 232
"__id__": 235
},
"_enabled": true,
"_normalMaterial": null,
......@@ -11593,7 +11767,7 @@
"zoomScale": 0.8,
"clickEvents": [
{
"__id__": 234
"__id__": 237
}
],
"_N$interactable": true,
......@@ -11654,7 +11828,7 @@
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 190
"__id__": 192
},
"component": "",
"_componentId": "e6b5fzQRcZEpoF18WPNSHXS",
......@@ -11666,7 +11840,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 232
"__id__": 235
},
"_enabled": true,
"_materials": [
......@@ -11701,26 +11875,32 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 190
"__id__": 192
},
"_enabled": true,
"shadow": {
"__id__": 154
},
"coin": {
"__id__": 196
"__id__": 198
},
"highScore": {
"__id__": 203
"__id__": 205
},
"currentScore": {
"__id__": 207
"__id__": 209
},
"ignoreBtn": {
"__id__": 232
"__id__": 235
},
"matchResultSrceen": {
"__id__": 237
"__id__": 240
},
"notEnough": {
"__id__": 156
},
"soundsController": {
"__id__": 168
},
"_id": "eegoI1mKFGLqQ+njNWlpQ0"
},
......@@ -11733,25 +11913,25 @@
},
"_children": [
{
"__id__": 238
"__id__": 241
},
{
"__id__": 240
"__id__": 243
},
{
"__id__": 246
"__id__": 249
},
{
"__id__": 257
"__id__": 260
},
{
"__id__": 262
"__id__": 265
},
{
"__id__": 269
"__id__": 272
}
],
"_active": true,
"_active": false,
"_components": [],
"_prefab": null,
"_opacity": 255,
......@@ -11806,13 +11986,13 @@
"_name": "Label2",
"_objFlags": 0,
"_parent": {
"__id__": 237
"__id__": 240
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 239
"__id__": 242
}
],
"_prefab": null,
......@@ -11868,7 +12048,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 238
"__id__": 241
},
"_enabled": true,
"_materials": [
......@@ -11903,20 +12083,20 @@
"_name": "CoinBar",
"_objFlags": 0,
"_parent": {
"__id__": 237
"__id__": 240
},
"_children": [
{
"__id__": 241
"__id__": 244
},
{
"__id__": 243
"__id__": 246
}
],
"_active": true,
"_components": [
{
"__id__": 245
"__id__": 248
}
],
"_prefab": null,
......@@ -11972,13 +12152,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 240
"__id__": 243
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 242
"__id__": 245
}
],
"_prefab": null,
......@@ -12034,7 +12214,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 241
"__id__": 244
},
"_enabled": true,
"_materials": [
......@@ -12066,13 +12246,13 @@
"_name": "Coin",
"_objFlags": 0,
"_parent": {
"__id__": 240
"__id__": 243
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 244
"__id__": 247
}
],
"_prefab": null,
......@@ -12128,7 +12308,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 243
"__id__": 246
},
"_enabled": true,
"_materials": [
......@@ -12163,7 +12343,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 240
"__id__": 243
},
"_enabled": true,
"_materials": [
......@@ -12195,17 +12375,17 @@
"_name": "ScoreBox",
"_objFlags": 0,
"_parent": {
"__id__": 237
"__id__": 240
},
"_children": [
{
"__id__": 247
"__id__": 250
},
{
"__id__": 249
"__id__": 252
},
{
"__id__": 253
"__id__": 256
}
],
"_active": true,
......@@ -12263,13 +12443,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 246
"__id__": 249
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 248
"__id__": 251
}
],
"_prefab": null,
......@@ -12325,7 +12505,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 247
"__id__": 250
},
"_enabled": true,
"_materials": [
......@@ -12357,17 +12537,17 @@
"_name": "HighScoreBar",
"_objFlags": 0,
"_parent": {
"__id__": 246
"__id__": 249
},
"_children": [
{
"__id__": 250
"__id__": 253
}
],
"_active": true,
"_components": [
{
"__id__": 252
"__id__": 255
}
],
"_prefab": null,
......@@ -12423,13 +12603,13 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 249
"__id__": 252
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 251
"__id__": 254
}
],
"_prefab": null,
......@@ -12485,7 +12665,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 250
"__id__": 253
},
"_enabled": true,
"_materials": [
......@@ -12520,7 +12700,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 249
"__id__": 252
},
"_enabled": true,
"_materials": [
......@@ -12552,17 +12732,17 @@
"_name": "CurrentScoreBar",
"_objFlags": 0,
"_parent": {
"__id__": 246
"__id__": 249
},
"_children": [
{
"__id__": 254
"__id__": 257
}
],
"_active": true,
"_components": [
{
"__id__": 256
"__id__": 259
}
],
"_prefab": null,
......@@ -12618,13 +12798,13 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 253
"__id__": 256
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 255
"__id__": 258
}
],
"_prefab": null,
......@@ -12680,7 +12860,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 254
"__id__": 257
},
"_enabled": true,
"_materials": [
......@@ -12715,7 +12895,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 253
"__id__": 256
},
"_enabled": true,
"_materials": [
......@@ -12747,14 +12927,14 @@
"_name": "RewardBar",
"_objFlags": 0,
"_parent": {
"__id__": 237
"__id__": 240
},
"_children": [
{
"__id__": 258
"__id__": 261
},
{
"__id__": 260
"__id__": 263
}
],
"_active": true,
......@@ -12812,13 +12992,13 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 257
"__id__": 260
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 259
"__id__": 262
}
],
"_prefab": null,
......@@ -12874,7 +13054,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 258
"__id__": 261
},
"_enabled": true,
"_materials": [
......@@ -12909,13 +13089,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 257
"__id__": 260
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 261
"__id__": 264
}
],
"_prefab": null,
......@@ -12971,7 +13151,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 260
"__id__": 263
},
"_enabled": true,
"_materials": [
......@@ -13003,20 +13183,20 @@
"_name": "RestartBtn",
"_objFlags": 0,
"_parent": {
"__id__": 237
"__id__": 240
},
"_children": [
{
"__id__": 263
"__id__": 266
}
],
"_active": true,
"_components": [
{
"__id__": 266
"__id__": 269
},
{
"__id__": 267
"__id__": 270
}
],
"_prefab": null,
......@@ -13072,16 +13252,16 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 262
"__id__": 265
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 264
"__id__": 267
},
{
"__id__": 265
"__id__": 268
}
],
"_prefab": null,
......@@ -13137,7 +13317,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 263
"__id__": 266
},
"_enabled": true,
"_materials": [
......@@ -13172,7 +13352,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 263
"__id__": 266
},
"_enabled": true,
"_color": {
......@@ -13190,7 +13370,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 262
"__id__": 265
},
"_enabled": true,
"_materials": [
......@@ -13222,7 +13402,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 262
"__id__": 265
},
"_enabled": true,
"_normalMaterial": null,
......@@ -13231,7 +13411,7 @@
"zoomScale": 0.8,
"clickEvents": [
{
"__id__": 268
"__id__": 271
}
],
"_N$interactable": true,
......@@ -13304,26 +13484,26 @@
"_name": "ReviveBtnAds",
"_objFlags": 0,
"_parent": {
"__id__": 237
"__id__": 240
},
"_children": [
{
"__id__": 270
"__id__": 273
},
{
"__id__": 273
"__id__": 276
},
{
"__id__": 275
"__id__": 278
}
],
"_active": true,
"_components": [
{
"__id__": 277
"__id__": 280
},
{
"__id__": 278
"__id__": 281
}
],
"_prefab": null,
......@@ -13379,16 +13559,16 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 269
"__id__": 272
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 271
"__id__": 274
},
{
"__id__": 272
"__id__": 275
}
],
"_prefab": null,
......@@ -13444,7 +13624,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 270
"__id__": 273
},
"_enabled": true,
"_materials": [
......@@ -13479,7 +13659,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 270
"__id__": 273
},
"_enabled": true,
"_color": {
......@@ -13497,13 +13677,13 @@
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 269
"__id__": 272
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 274
"__id__": 277
}
],
"_prefab": null,
......@@ -13559,7 +13739,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 273
"__id__": 276
},
"_enabled": true,
"_materials": [
......@@ -13591,13 +13771,13 @@
"_name": "Coin",
"_objFlags": 0,
"_parent": {
"__id__": 269
"__id__": 272
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 276
"__id__": 279
}
],
"_prefab": null,
......@@ -13653,7 +13833,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 275
"__id__": 278
},
"_enabled": true,
"_materials": [
......@@ -13685,7 +13865,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 269
"__id__": 272
},
"_enabled": true,
"_materials": [
......@@ -13717,7 +13897,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 269
"__id__": 272
},
"_enabled": true,
"_normalMaterial": null,
......@@ -13791,7 +13971,7 @@
"_active": true,
"_components": [
{
"__id__": 280
"__id__": 283
}
],
"_prefab": null,
......@@ -13847,7 +14027,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 279
"__id__": 282
},
"_enabled": true,
"_materials": [
......@@ -13885,7 +14065,7 @@
"_active": true,
"_components": [
{
"__id__": 282
"__id__": 285
}
],
"_prefab": null,
......@@ -13941,7 +14121,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 281
"__id__": 284
},
"_enabled": true,
"_materials": [
......
import BlockData from "../Data/BlockData";
import LocalStorage from "../Data/LocalStorage";
import GameController from "./GameController";
import GameOverScreen from "./GameOverScreen";
import SoundsController from "./SoundsController";
const { ccclass, property } = cc._decorator;
......@@ -15,12 +15,15 @@ export default class ButtonsController extends cc.Component {
@property(cc.Node) soundBtn: cc.Node = null;
@property(cc.Node) popup: cc.Node = null;
@property(cc.Node) destroyBlockPopUp: cc.Node = null;
@property(SoundsController) soundsController: SoundsController = null;
currentSoundSpf: cc.SpriteFrame;
protected onLoad(): void {
if (LocalStorage.getMusic()) {
this.currentSoundSpf = this.soundOnSpf;
cc.audioEngine.setMusicVolume(1);
cc.audioEngine.setEffectsVolume(1);
} else {
this.currentSoundSpf = this.soundOffSpf;
cc.audioEngine.setMusicVolume(0);
......@@ -34,10 +37,12 @@ export default class ButtonsController extends cc.Component {
this.startScreen.active = false;
this.shadow.active = false;
GameController.instance.node.emit("startGame");
this.soundsController.playSound("click_btn");
}
onClickPause() {
if (GameOverScreen.instance.gameOver) return;
this.soundsController.playSound("tap");
if (GameController.instance.isGameOver) return;
if (!GameController.instance.isGameStart) return;
if (GameController.instance.isGamePaused) {
GameController.instance.isGamePaused = false;
......@@ -51,16 +56,22 @@ export default class ButtonsController extends cc.Component {
}
onClickRestart() {
this.soundsController.playSound("tap");
cc.director.loadScene("gameplay");
}
onClickSound() {
this.soundsController.playSound("tap");
if (this.currentSoundSpf === this.soundOnSpf) {
this.currentSoundSpf = this.soundOffSpf;
LocalStorage.setMusic(false);
cc.audioEngine.setMusicVolume(0);
cc.audioEngine.setEffectsVolume(0);
} else {
this.currentSoundSpf = this.soundOnSpf;
LocalStorage.setMusic(true);
cc.audioEngine.setMusicVolume(1);
cc.audioEngine.setEffectsVolume(1);
}
this.updateSoundBtnSpf();
}
......@@ -86,6 +97,7 @@ export default class ButtonsController extends cc.Component {
.getChildByName("Label")
.getComponent(cc.Label).string = LocalStorage.getAllCoin().toString();
GameController.instance.isGet512Block = true;
this.soundsController.playSound("buy_booster");
}
onClickBuyNextBlock() {
......@@ -104,9 +116,11 @@ export default class ButtonsController extends cc.Component {
.getChildByName("Label")
.getComponent(cc.Label).string = LocalStorage.getAllCoin().toString();
GameController.instance.isPreviewNextBlock = true;
this.soundsController.playSound("buy_booster");
}
onClickDestroyBlock() {
this.soundsController.playSound("tap");
const data = BlockData.instance.blockData;
let hasNonZeroValue = false;
......
......@@ -4,6 +4,7 @@ import Score from "../Data/Score";
import Block from "../Objects/Block";
import Utils from "../Tools/Utils";
import GameOverScreen from "./GameOverScreen";
import SoundsController from "./SoundsController";
const { ccclass, property } = cc._decorator;
......@@ -18,6 +19,7 @@ export default class GameController extends cc.Component {
@property(cc.Node) nextBlockSpf: cc.Node = null;
@property(cc.Node) shadow: cc.Node = null;
@property(cc.Node) gameOverScreen: cc.Node = null;
@property(SoundsController) soundsController: SoundsController = null;
static instance: GameController;
......@@ -38,7 +40,10 @@ export default class GameController extends cc.Component {
isGameStart: boolean = false;
isGet512Block: boolean = false;
isPreviewNextBlock: boolean = false;
isGameOver: boolean = false;
nextBlock: number = 0;
numberOfConsecutiveMerges: number = 0;
protected onLoad(): void {
GameController.instance = this;
......@@ -78,9 +83,12 @@ export default class GameController extends cc.Component {
spawnBlock(index: number) {
if (this.blocksData.blockData.length > 0) {
const isFull = this.blocksData.blockData[0].some((e) => e !== 0);
if (isFull)
if (isFull) {
this.isGameOver = true;
this.soundsController.playSound("game_over");
return this.gameOverScreen.getComponent(GameOverScreen).isGameOver();
}
}
if (this.isPreviewNextBlock) {
this.nextBlock = this.blocksData.generateNumber();
......@@ -159,6 +167,7 @@ export default class GameController extends cc.Component {
}
onDropBlock(col: number) {
this.soundsController.playSound("fall_fast");
for (let row = 5; row >= 0; row--) {
if (this.blocksData.getBlockValue(row, col) == 0) {
this.cellTarget = this.board.children[row * 5 + col];
......@@ -231,6 +240,7 @@ export default class GameController extends cc.Component {
}
if (!canMerge) {
this.numberOfConsecutiveMerges = 0;
this.blocksData.setBlockValue(
row,
col,
......@@ -340,6 +350,10 @@ export default class GameController extends cc.Component {
}
mergeAction(cellToMerge: cc.Node, value: number, index: number) {
this.soundsController.playSoundMerge(
(this.numberOfConsecutiveMerges += 1 * this.cachedBlocksToMove.length)
);
let hasCheckedEmptyCell = false;
for (let i = 0; i < this.cachedBlocksToMove.length; i++) {
......
import BlockData from "../Data/BlockData";
import LocalStorage from "../Data/LocalStorage";
import Score from "../Data/Score";
import GameController from "./GameController";
import SoundsController from "./SoundsController";
const { ccclass, property } = cc._decorator;
......@@ -11,17 +14,16 @@ export default class GameOverScreen extends cc.Component {
@property(cc.Node) currentScore: cc.Node = null;
@property(cc.Node) ignoreBtn: cc.Node = null;
@property(cc.Node) matchResultSrceen: cc.Node = null;
@property(cc.Node) notEnough: cc.Node = null;
@property(SoundsController) soundsController: SoundsController = null;
static instance: GameOverScreen;
gameOver: boolean = false;
protected onLoad(): void {
GameOverScreen.instance = this;
}
isGameOver() {
this.gameOver = true;
this.shadow.active = true;
this.node.active = true;
this.coin.getComponent(cc.Label).string =
......@@ -35,6 +37,7 @@ export default class GameOverScreen extends cc.Component {
}
onClickIgnoreBtn() {
this.soundsController.playSound("collectGems");
this.node.active = false;
this.matchResultSrceen.active = true;
this.matchResultSrceen
......@@ -58,7 +61,7 @@ export default class GameOverScreen extends cc.Component {
const score = Score.instance.currentScore;
const rewardValues = [10, 20, 30, 40, 50, 60, 70, 80, 100];
if (score < 3000) return this.updateReward(0);
if (score < 3000) return this.updateReward(5);
for (let i = 0; i < rewardValues.length; i++) {
if (score <= (i + 1) * 10000) {
......@@ -81,4 +84,36 @@ export default class GameOverScreen extends cc.Component {
.getChildByName("Coin")
.getComponent(cc.Label).string = LocalStorage.getAllCoin().toString();
}
onClickRevive() {
if (LocalStorage.getAllCoin() < 150)
return this.notEnough.getComponent(cc.Animation).play("PopUp");
this.soundsController.playSound("unlock_newtile_1");
const data = BlockData.instance.blockData;
const childrens = GameController.instance.board.children;
for (let row = 0; row < 3; row++) {
for (let col = 0; col < 5; col++) {
if (data[row][col] !== 0) {
data[row][col] = 0;
}
}
}
for (let i = 0; i < 15; i++) {
const cell = childrens[i];
if (cell.children && cell.children[0]) {
cell.children[0].destroy();
}
}
this.node.active = false;
this.shadow.active = false;
GameController.instance.isGameOver = false;
LocalStorage.setAllCoin(LocalStorage.getAllCoin() - 150);
this.coin.getComponent(cc.Label).string =
LocalStorage.getAllCoin().toString();
GameController.instance.node.emit("startGame");
}
}
const { ccclass, property } = cc._decorator;
@ccclass
export default class SoundsController extends cc.Component {
@property(Array(cc.AudioClip)) sounds: Array<cc.AudioClip> =
new Array<cc.AudioClip>();
@property(Array(cc.AudioClip)) soundsMerge: Array<cc.AudioClip> =
new Array<cc.AudioClip>();
playSound(name: string) {
for (let i = 0; i < this.sounds.length; i++) {
const sound = this.sounds[i];
if (sound.name == name) {
cc.audioEngine.playEffect(sound, false);
}
}
}
playSoundMerge(time: number) {
cc.audioEngine.playEffect(this.soundsMerge[time], false);
}
}
{
"ver": "1.1.0",
"uuid": "15214547-c260-47af-af16-f4a0879069ae",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
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