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

09/10/23 commit

parent 8b846837
{
"__type__": "cc.AnimationClip",
"_name": "TapToPlay",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 60,
"speed": 0.1,
"wrapMode": 2,
"curveData": {
"props": {
"scale": [
{
"frame": 0,
"value": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
}
},
{
"frame": 0.11666666666666667,
"value": {
"__type__": "cc.Vec3",
"x": 1.3,
"y": 1.3,
"z": 1
}
},
{
"frame": 0.25,
"value": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
}
}
]
}
},
"events": []
}
\ No newline at end of file
{
"ver": "2.1.2",
"uuid": "6bdaace5-4f0a-4fd2-922a-714f27be16a4",
"importer": "animation-clip",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.7",
"uuid": "3e5732c0-46c8-433b-813b-005de92eb2ab",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 175,
"height": 115,
"platformSettings": {},
"subMetas": {
"barGreen": {
"ver": "1.0.6",
"uuid": "4f2ea4de-c652-4ecf-82e2-d7cb3b344f08",
"importer": "sprite-frame",
"rawTextureUuid": "3e5732c0-46c8-433b-813b-005de92eb2ab",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -1,
"trimX": 9,
"trimY": 11,
"width": 157,
"height": 95,
"rawWidth": 175,
"rawHeight": 115,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 45,
"borderRight": 47,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.7",
"uuid": "f8ad0a65-5ebe-4bf0-8b42-a831bb2020e2",
"uuid": "218e4d7b-57d0-46de-89dc-13024c58f088",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
......@@ -8,15 +8,15 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 54,
"height": 38,
"width": 129,
"height": 68,
"platformSettings": {},
"subMetas": {
"startPoint": {
"barRed": {
"ver": "1.0.6",
"uuid": "198639e5-9950-4d01-b8c5-732441df6eab",
"uuid": "275cde9d-9690-4a29-888f-a7afc78f5a09",
"importer": "sprite-frame",
"rawTextureUuid": "f8ad0a65-5ebe-4bf0-8b42-a831bb2020e2",
"rawTextureUuid": "218e4d7b-57d0-46de-89dc-13024c58f088",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......@@ -24,10 +24,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 54,
"height": 38,
"rawWidth": 54,
"rawHeight": 38,
"width": 129,
"height": 68,
"rawWidth": 129,
"rawHeight": 68,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.7",
"uuid": "e163aae5-6ef4-4807-921f-14e6bcfa3590",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 76,
"height": 76,
"platformSettings": {},
"subMetas": {
"circleRed": {
"ver": "1.0.6",
"uuid": "54a46da2-0226-4624-b0b2-646221c8bbfd",
"importer": "sprite-frame",
"rawTextureUuid": "e163aae5-6ef4-4807-921f-14e6bcfa3590",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 76,
"height": 76,
"rawWidth": 76,
"rawHeight": 76,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.7",
"uuid": "278f55a6-a5ac-4eaa-af71-235a558a7a3a",
"uuid": "85d64a28-9537-4577-922d-f764ed0ac74f",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
......@@ -8,15 +8,15 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 33,
"height": 33,
"width": 70,
"height": 74,
"platformSettings": {},
"subMetas": {
"plus": {
"hammer": {
"ver": "1.0.6",
"uuid": "a7b930b1-c853-41c8-99b7-7dc0ae10aa48",
"uuid": "c8bfcc19-3ef5-473d-87ae-815666e2a409",
"importer": "sprite-frame",
"rawTextureUuid": "278f55a6-a5ac-4eaa-af71-235a558a7a3a",
"rawTextureUuid": "85d64a28-9537-4577-922d-f764ed0ac74f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......@@ -24,10 +24,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 33,
"height": 33,
"rawWidth": 33,
"rawHeight": 33,
"width": 70,
"height": 74,
"rawWidth": 70,
"rawHeight": 74,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.7",
"uuid": "e5993cc3-8c4b-45f6-b2c3-4e189071369a",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 70,
"height": 70,
"platformSettings": {},
"subMetas": {
"nextBlock": {
"ver": "1.0.6",
"uuid": "3e63b730-46cd-4cda-950c-45a8033248d1",
"importer": "sprite-frame",
"rawTextureUuid": "e5993cc3-8c4b-45f6-b2c3-4e189071369a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 70,
"height": 70,
"rawWidth": 70,
"rawHeight": 70,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.7",
"uuid": "dfe2d310-9bd5-4071-98d1-8d05155e83dc",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 55,
"height": 67,
"platformSettings": {},
"subMetas": {
"restart": {
"ver": "1.0.6",
"uuid": "f974169d-33c4-41e0-a354-2d4573ba8e41",
"importer": "sprite-frame",
"rawTextureUuid": "dfe2d310-9bd5-4071-98d1-8d05155e83dc",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 55,
"height": 67,
"rawWidth": 55,
"rawHeight": 67,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.7",
"uuid": "4af2df70-8616-4f52-ba51-e375be5237a3",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 57,
"height": 57,
"platformSettings": {},
"subMetas": {
"soundOFF": {
"ver": "1.0.6",
"uuid": "2fcf078b-37c9-4a22-9509-4602ff630f35",
"importer": "sprite-frame",
"rawTextureUuid": "4af2df70-8616-4f52-ba51-e375be5237a3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 57,
"height": 57,
"rawWidth": 57,
"rawHeight": 57,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -78,28 +78,34 @@
"__id__": 54
},
{
"__id__": 55
"__id__": 112
},
{
"__id__": 57
},
{
"__id__": 72
"__id__": 114
},
{
"__id__": 8
},
{
"__id__": 42
},
{
"__id__": 66
},
{
"__id__": 68
}
],
"_active": true,
"_components": [
{
"__id__": 74
"__id__": 116
},
{
"__id__": 75
"__id__": 117
}
],
"_prefab": null,
......@@ -258,6 +264,9 @@
"_children": [
{
"__id__": 6
},
{
"__id__": 64
}
],
"_active": true,
......@@ -392,6 +401,9 @@
"blocksData": {
"__id__": 53
},
"scoreLbl": {
"__id__": 55
},
"_id": "3fQVty34VNO4exzcgIvAU2"
},
{
......@@ -3014,33 +3026,49 @@
"groupIndex": 0,
"_id": "a1mzPrZW9MtJNQJn1jlR8x"
},
{
"__type__": "f49e7R4FsROzprbJn3AkeKP",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 56
},
"_enabled": true,
"highScoreLbl": {
"__id__": 96
},
"_id": "d8Bv+5C0pLG6PE5Rjyn81l"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_name": "ScoreLabel",
"_objFlags": 0,
"_parent": {
"__id__": 2
"__id__": 57
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
"__id__": 111
},
{
"__id__": 55
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 48,
"g": 54,
"b": 72,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 1180
"width": 22.83,
"height": 37.8
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3051,8 +3079,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
-175.561,
387.822,
0,
0,
0,
......@@ -3074,39 +3102,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "29xyaRpRJNB7tM4+Z1rtnp"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "b8p8O+4j1ElKn2RTVzcgQ8"
"_id": "8e/mLYQXZAW6DXSVWU3acw"
},
{
"__type__": "cc.Node",
......@@ -3120,22 +3116,25 @@
"__id__": 58
},
{
"__id__": 60
"__id__": 92
},
{
"__id__": 62
"__id__": 94
},
{
"__id__": 64
"__id__": 96
},
{
"__id__": 66
"__id__": 98
},
{
"__id__": 68
"__id__": 56
},
{
"__id__": 70
"__id__": 100
},
{
"__id__": 104
}
],
"_active": true,
......@@ -3195,11 +3194,18 @@
"_parent": {
"__id__": 57
},
"_children": [],
"_children": [
{
"__id__": 59
}
],
"_active": true,
"_components": [
{
"__id__": 59
"__id__": 61
},
{
"__id__": 62
}
],
"_prefab": null,
......@@ -3225,8 +3231,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
233.01,
477.674,
211.39,
491.471,
0,
0,
0,
......@@ -3234,7 +3240,7 @@
1,
1,
1,
1
0
]
},
"_eulerAngles": {
......@@ -3250,50 +3256,18 @@
"groupIndex": 0,
"_id": "59H9RCXyJGrp+XAiQ7OEB3"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 58
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "0a8879b8-3da6-4588-a7e0-800ccd1d93d0"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6d+PCOkpxNRK0IkMmOaAIF"
},
{
"__type__": "cc.Node",
"_name": "Pause",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 58
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 61
"__id__": 60
}
],
"_prefab": null,
......@@ -3319,8 +3293,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
233.01,
477.674,
0,
0,
0,
0,
0,
......@@ -3349,7 +3323,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 60
"__id__": 59
},
"_enabled": true,
"_materials": [
......@@ -3376,74 +3350,12 @@
"_atlas": null,
"_id": "a0lo3RXztGBI0mQPSd48ay"
},
{
"__type__": "cc.Node",
"_name": "HighestBar",
"_objFlags": 0,
"_parent": {
"__id__": 57
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 63
}
],
"_prefab": null,
"_opacity": 200,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 166,
"height": 61
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-145,
461,
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": "fcnbUaI0hJDZvvMnqx6Tpi"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 62
"__id__": 58
},
"_enabled": true,
"_materials": [
......@@ -3454,9 +3366,9 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dbb38f0b-46a8-4ddf-967b-41ce03e34ef3"
"__uuid__": "0a8879b8-3da6-4588-a7e0-800ccd1d93d0"
},
"_type": 1,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
......@@ -3468,14 +3380,96 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "4ex7zTzH9Jg499AeMFtfUh"
"_id": "6d+PCOkpxNRK0IkMmOaAIF"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 58
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 0.8,
"clickEvents": [
{
"__id__": 63
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 3,
"transition": 3,
"_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": "1c1DA5vv1PF7lNzkE/RKSu"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 64
},
"component": "",
"_componentId": "88a0cSFKRpJK7RpoO4AdPHx",
"handler": "onClickPause",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "Couronne",
"_name": "ButtonsController",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 5
},
"_children": [],
"_active": true,
......@@ -3495,8 +3489,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 42,
"height": 36
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3507,8 +3501,1396 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-142.243,
524,
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": "f5hDNn74pKg6KiCnvkDYVi"
},
{
"__type__": "88a0cSFKRpJK7RpoO4AdPHx",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"pauseBtn": {
"__id__": 62
},
"shadow": {
"__id__": 66
},
"pauseScreen": {
"__id__": 68
},
"soundOffSpf": {
"__uuid__": "2fcf078b-37c9-4a22-9509-4602ff630f35"
},
"soundOnSpf": {
"__uuid__": "493e3e03-38bf-4522-9ed9-c352d790ad4b"
},
"soundBtn": {
"__id__": 77
},
"_id": "2cdM3LFE9AAI82qX2pNxpL"
},
{
"__type__": "cc.Node",
"_name": "Shadow",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 67
}
],
"_prefab": null,
"_opacity": 150,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 1180
},
"_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": "d4ksVnZmZNs5vpHH+4FCWU"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 66
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6fpvVhsIFB14Rp/AQZvuw9"
},
{
"__type__": "cc.Node",
"_name": "PauseScreen",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 69
},
{
"__id__": 71
},
{
"__id__": 77
},
{
"__id__": 83
}
],
"_active": false,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 1180
},
"_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": "d6j829CONLm5qMkHPN2v97"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 68
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 70
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 207.12,
"height": 63
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-4.941,
242.446,
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": "42H61xnMVJs6ZZ+FwVym34"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "PAUSE",
"_N$string": "PAUSE",
"_fontSize": 60,
"_lineHeight": 50,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "89306fe6-7b03-4ec8-a19a-68caafdc5504"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "35bvzAflhH1Ji/dUPwR9a6"
},
{
"__type__": "cc.Node",
"_name": "TapResume",
"_objFlags": 0,
"_parent": {
"__id__": 68
},
"_children": [
{
"__id__": 72
}
],
"_active": true,
"_components": [
{
"__id__": 75
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"height": 1180
},
"_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": "c406CutaZC36F+jIQ4DzJS"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 73
},
{
"__id__": 74
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 226.91,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-210.041,
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": "6dH1pK/OdJmJAztOT+GVCY"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "6bdaace5-4f0a-4fd2-922a-714f27be16a4"
},
"_clips": [
{
"__uuid__": "6bdaace5-4f0a-4fd2-922a-714f27be16a4"
}
],
"playOnLoad": true,
"_id": "7b/XcjbBNFwbIu2FhdErP/"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Tap to play",
"_N$string": "Tap to play",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "2b6115a2-5876-4aee-bb6f-e7b56ffdc7c4"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "fdLnigX3VARZ5dOqHFPolP"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 71
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 76
}
],
"_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": "f5FWF6WJpC8b1KS/FduDyI"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 64
},
"component": "",
"_componentId": "88a0cSFKRpJK7RpoO4AdPHx",
"handler": "onClickPause",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "SoundBtn",
"_objFlags": 0,
"_parent": {
"__id__": 68
},
"_children": [
{
"__id__": 78
}
],
"_active": true,
"_components": [
{
"__id__": 80
},
{
"__id__": 81
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-159.518,
40,
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": "a13nFrzetIAqHWf2OkgUi4"
},
{
"__type__": "cc.Node",
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 77
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 79
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 55,
"height": 55
},
"_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": "fd8AFkBlxBrrcwZgFpz4OU"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 78
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "493e3e03-38bf-4522-9ed9-c352d790ad4b"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "0cg5pcTPlL3okzplHyZUBp"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "170b0a6b-0a15-4579-9ac0-52ee45b163bc"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "cbro8+LBpEnpWw7KHx6B3k"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 0.8,
"clickEvents": [
{
"__id__": 82
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 3,
"transition": 3,
"_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": "c3EFk8qvpPPpYSfZqVq5sS"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 64
},
"component": "",
"_componentId": "88a0cSFKRpJK7RpoO4AdPHx",
"handler": "onClickSound",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "RestartBtn",
"_objFlags": 0,
"_parent": {
"__id__": 68
},
"_children": [
{
"__id__": 84
},
{
"__id__": 87
}
],
"_active": true,
"_components": [
{
"__id__": 89
},
{
"__id__": 90
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 300,
"height": 95
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
84.58,
40,
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": "99SMIhXxtPMI77uXMLPcMj"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 83
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 85
},
{
"__id__": 86
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 177.49,
"height": 52.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
37.133,
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": "6aApoqRh1EWr9aBZT/B6S2"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "RESTART",
"_N$string": "RESTART",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "2b6115a2-5876-4aee-bb6f-e7b56ffdc7c4"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "42SJoNtulBi6XwEkHQ9pYL"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_width": 1,
"_id": "ddMOpfD4VKPqI9uOErtRlh"
},
{
"__type__": "cc.Node",
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 83
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 88
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 55,
"height": 67
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-93.884,
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": "1aXSWTlk1DNYySIm5uhe5f"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f974169d-33c4-41e0-a354-2d4573ba8e41"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "421LJ3CxFDZ6sB1Rd1MQ3N"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4f2ea4de-c652-4ecf-82e2-d7cb3b344f08"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "b3WfDzPzBGMZrqzsj3Y11Z"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 0.8,
"clickEvents": [
{
"__id__": 91
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 3,
"transition": 3,
"_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": "38fhyuCv1B+oFUb53GXjdp"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 64
},
"component": "",
"_componentId": "88a0cSFKRpJK7RpoO4AdPHx",
"handler": "onClickRestart",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "HighestBar",
"_objFlags": 0,
"_parent": {
"__id__": 57
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 93
}
],
"_prefab": null,
"_opacity": 200,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 166,
"height": 61
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-176,
461,
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": "fcnbUaI0hJDZvvMnqx6Tpi"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 92
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dbb38f0b-46a8-4ddf-967b-41ce03e34ef3"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "4ex7zTzH9Jg499AeMFtfUh"
},
{
"__type__": "cc.Node",
"_name": "Couronne",
"_objFlags": 0,
"_parent": {
"__id__": 57
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 95
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 42,
"height": 36
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-173.243,
524,
0,
0,
0,
......@@ -3523,59 +4905,514 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 29.232
"z": 29.232
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b177AOqVpB2a4hKLmf3Y0x"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ed5c78f5-5b7d-4d93-a437-7696e30d21f4"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "d1L62hrKVKcahJ6LDB1rkq"
},
{
"__type__": "cc.Node",
"_name": "HighestLabel",
"_objFlags": 0,
"_parent": {
"__id__": 57
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 97
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 246,
"b": 158,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 18.1,
"height": 31.5
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-176.932,
461,
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": "347Fktlo1BoZ04dHiHGxbU"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "0",
"_N$string": "0",
"_fontSize": 25,
"_lineHeight": 25,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "9bde507c-0766-4844-ae73-02962a0559d3"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "a73kf50RpMs71dBqt52QNZ"
},
{
"__type__": "cc.Node",
"_name": "ScoreBar",
"_objFlags": 0,
"_parent": {
"__id__": 57
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 99
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 250,
"height": 72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-173.568,
385,
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": "28k6SqwJ1CYooFekJwQnn1"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 98
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dbb38f0b-46a8-4ddf-967b-41ce03e34ef3"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "38QCYPcGRAPKPS7Wr6kE8W"
},
{
"__type__": "cc.Node",
"_name": "NextBlock",
"_objFlags": 0,
"_parent": {
"__id__": 57
},
"_children": [
{
"__id__": 101
}
],
"_active": true,
"_components": [
{
"__id__": 103
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
15.953,
385,
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": "3fwOvj3SFOpZ6d36IuqB/z"
},
{
"__type__": "cc.Node",
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 100
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 102
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50,
"height": 50
},
"_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": "81nvGJNpZO1r65N5xEMWP/"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "3e63b730-46cd-4cda-950c-45a8033248d1"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "01J5u3v2RNladX6XS76V+X"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dbb38f0b-46a8-4ddf-967b-41ce03e34ef3"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "4eP6X3UJtO8p265+6dFfud"
},
{
"__type__": "cc.Node",
"_name": "DestroyBlock",
"_objFlags": 0,
"_parent": {
"__id__": 57
},
"_children": [
{
"__id__": 105
},
{
"__id__": 107
}
],
"_active": true,
"_components": [
{
"__id__": 109
},
{
"__id__": 110
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 220,
"height": 72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
190.618,
385,
0,
0,
0,
0,
1,
1,
1,
0
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b177AOqVpB2a4hKLmf3Y0x"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ed5c78f5-5b7d-4d93-a437-7696e30d21f4"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "d1L62hrKVKcahJ6LDB1rkq"
"_id": "c10bOP+UBC6LrHArBPitmd"
},
{
"__type__": "cc.Node",
"_name": "HighestLabel",
"_name": "Icon",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 104
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 67
"__id__": 106
}
],
"_prefab": null,
......@@ -3583,14 +5420,14 @@
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 246,
"b": 158,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 64.55,
"height": 31.5
"width": 50,
"height": 50
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3601,8 +5438,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-145.932,
461,
52.333,
0,
0,
0,
0,
......@@ -3624,14 +5461,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "347Fktlo1BoZ04dHiHGxbU"
"_id": "f8ccT5RkhDZY7F4CitYmyy"
},
{
"__type__": "cc.Label",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 66
"__id__": 105
},
"_enabled": true,
"_materials": [
......@@ -3641,38 +5478,35 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "7620",
"_N$string": "7620",
"_fontSize": 25,
"_lineHeight": 25,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "9bde507c-0766-4844-ae73-02962a0559d3"
"_spriteFrame": {
"__uuid__": "c8bfcc19-3ef5-473d-87ae-815666e2a409"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "a73kf50RpMs71dBqt52QNZ"
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "efiKl5P9JPYoRkOOLj7Ah8"
},
{
"__type__": "cc.Node",
"_name": "ScoreBar",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 104
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 69
"__id__": 108
}
],
"_prefab": null,
......@@ -3686,8 +5520,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 250,
"height": 72
"width": 99.08,
"height": 45.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3698,8 +5532,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-142.568,
385,
-31.442,
0,
0,
0,
0,
......@@ -3721,14 +5555,49 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "28k6SqwJ1CYooFekJwQnn1"
"_id": "4b1EpmdQ9MjLZWDX5lwvra"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 107
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "DESTROY\nBLOCK",
"_N$string": "DESTROY\nBLOCK",
"_fontSize": 20,
"_lineHeight": 20,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "9bde507c-0766-4844-ae73-02962a0559d3"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "d3ikP2CKRLaIPg4p5z0nvG"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 68
"__id__": 104
},
"_enabled": true,
"_materials": [
......@@ -3753,35 +5622,138 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "38QCYPcGRAPKPS7Wr6kE8W"
"_id": "49Tc/WcRBKlrLV7N8gcyJT"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 0.8,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 3,
"transition": 3,
"_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": "c5mBk87JZJn7Xcn1SpLgkx"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 56
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "0",
"_N$string": "0",
"_fontSize": 40,
"_lineHeight": 30,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "6f0d4d99-b207-4755-9233-a2544dc7a038"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "53i2qrGphPgIb8LaN6GGkC"
},
{
"__type__": "cc.Node",
"_name": "ScoreLabel",
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 71
"__id__": 113
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 48,
"g": 54,
"b": 72,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 45.66,
"height": 37.8
"width": 640,
"height": 1180
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3792,8 +5764,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-144.561,
387.822,
0,
0,
0,
0,
0,
......@@ -3815,14 +5787,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "8e/mLYQXZAW6DXSVWU3acw"
"_id": "29xyaRpRJNB7tM4+Z1rtnp"
},
{
"__type__": "cc.Label",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 112
},
"_enabled": true,
"_materials": [
......@@ -3830,27 +5802,24 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_string": "25",
"_N$string": "25",
"_fontSize": 40,
"_lineHeight": 30,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "6f0d4d99-b207-4755-9233-a2544dc7a038"
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "53i2qrGphPgIb8LaN6GGkC"
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "b8p8O+4j1ElKn2RTVzcgQ8"
},
{
"__type__": "cc.Node",
......@@ -3863,7 +5832,7 @@
"_active": true,
"_components": [
{
"__id__": 73
"__id__": 115
}
],
"_prefab": null,
......@@ -3919,7 +5888,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 114
},
"_enabled": true,
"_materials": [
......
import LocalStorage from "../Data/LocalStorage";
import GameController from "./GameController";
const { ccclass, property } = cc._decorator;
@ccclass
export default class ButtonsController extends cc.Component {
@property(cc.Button) pauseBtn: cc.Button = null;
@property(cc.Node) shadow: cc.Node = null;
@property(cc.Node) pauseScreen: cc.Node = null;
@property(cc.SpriteFrame) soundOffSpf: cc.SpriteFrame = null;
@property(cc.SpriteFrame) soundOnSpf: cc.SpriteFrame = null;
@property(cc.Node) soundBtn: cc.Node = null;
soundMode: boolean = true;
currentSoundSpf: cc.SpriteFrame = null;
protected onLoad(): void {
this.currentSoundSpf = this.soundBtn
.getChildByName("Icon")
.getComponent(cc.Sprite).spriteFrame;
if (LocalStorage.getMusic()) {
this.currentSoundSpf = this.soundOnSpf;
this.soundMode = true;
} else {
this.currentSoundSpf = this.soundOffSpf;
this.soundMode = false;
}
}
onClickPause() {
if (GameController.instance.isGamePaused) {
GameController.instance.isGamePaused = false;
this.shadow.active = false;
this.pauseScreen.active = false;
} else {
GameController.instance.isGamePaused = true;
this.shadow.active = true;
this.pauseScreen.active = true;
}
}
onClickRestart() {
cc.director.loadScene("gameplay");
}
onClickSound() {
console.log(this.currentSoundSpf);
if (this.soundMode) {
this.currentSoundSpf = this.soundOffSpf;
LocalStorage.setMusic(false);
this.soundMode = false;
} else {
this.currentSoundSpf = this.soundOnSpf;
LocalStorage.setMusic(true);
this.soundMode = true;
}
}
}
{
"ver": "1.1.0",
"uuid": "88a0c485-291a-492b-b469-a0ee0074f1f1",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import BlockData from "../Data/BlockData";
import Score from "../Data/Score";
import Block from "../Objects/Block";
import Utils from "../Tools/Utils";
......@@ -10,6 +11,7 @@ export default class GameController extends cc.Component {
@property(cc.Node) board: cc.Node = null;
@property(cc.Node) spawnBar: cc.Node = null;
@property(BlockData) blocksData: BlockData = null;
@property(Score) scoreLbl: Score = null;
static instance: GameController;
......@@ -21,9 +23,12 @@ export default class GameController extends cc.Component {
dropColumn: number = 0;
cellTarget: cc.Node = null;
spawnColumn: number = Utils.random(0, 4);
cachedBlocksToMerge: Array<cc.Node> = null;
cachedBlocksToMove: Array<cc.Node> = null;
currentBlockRow: number = 0;
currentBlockCol: number = 0;
cacheBlockToMerge = [];
isGamePaused: boolean = false;
protected onLoad(): void {
GameController.instance = this;
......@@ -66,6 +71,8 @@ export default class GameController extends cc.Component {
}
onTouchDown(event: cc.Event.EventTouch) {
if (this.isGamePaused) return;
let touchTarget = event.currentTarget;
this.dropPosX = touchTarget.x;
......@@ -81,7 +88,7 @@ export default class GameController extends cc.Component {
}
onTouchMove(event: cc.Event.EventTouch) {
if (this.currentBlock == null || !this.isHolding) {
if (this.currentBlock == null || !this.isHolding || this.isGamePaused) {
return;
}
......@@ -101,7 +108,7 @@ export default class GameController extends cc.Component {
}
onTouchEnd(event: cc.Event.EventTouch) {
if (!this.currentBlock || !this.isHolding) return;
if (!this.currentBlock || !this.isHolding || this.isGamePaused) return;
this.dropColumn = Math.floor(this.dropPosX / BlockData.BLOCK_SIZE) + 2;
this.spawnColumn = this.dropColumn;
......@@ -199,6 +206,7 @@ export default class GameController extends cc.Component {
this.currentBlock.getComponent(Block).isPlace = true;
this.touched = false;
this.currentBlock = null;
this.spawnBlock(this.blocksData.generateNumber());
}
}
......@@ -241,12 +249,12 @@ export default class GameController extends cc.Component {
}
}
this.cachedBlocksToMerge = blocksToMerge;
this.cachedBlocksToMove = blocksToMerge;
this.mergeBlock(nodeIndex);
}
mergeBlock(nodeIndex: number) {
let blocksToMergeCount = this.cachedBlocksToMerge.length + 1;
let blocksToMergeCount = this.cachedBlocksToMove.length + 1;
const cellToMerge = this.board.children[nodeIndex];
this.currentBlockRow = Math.floor(nodeIndex / 5);
this.currentBlockCol = nodeIndex % 5;
......@@ -263,8 +271,8 @@ export default class GameController extends cc.Component {
let index = Math.log(newValue) / Math.log(2) - 1;
for (let i = 0; i < this.cachedBlocksToMerge.length; i++) {
this.cachedBlocksToMerge[i].destroy();
for (let i = 0; i < this.cachedBlocksToMove.length; i++) {
this.cachedBlocksToMove[i].destroy();
}
if (this.currentBlock.parent) {
this.currentBlock.parent.removeChild(this.currentBlock);
......@@ -290,8 +298,8 @@ export default class GameController extends cc.Component {
mergeAction(cellToMerge: cc.Node, value: number, index: number) {
let hasCheckedEmptyCell = false;
for (let i = 0; i < this.cachedBlocksToMerge.length; i++) {
const block = this.cachedBlocksToMerge[i];
for (let i = 0; i < this.cachedBlocksToMove.length; i++) {
const block = this.cachedBlocksToMove[i];
const nodeClone = new cc.Node();
......@@ -311,8 +319,10 @@ export default class GameController extends cc.Component {
nodeClone.destroy();
nodeClone.parent.removeAllChildren();
this.scoreLbl.setScore(Math.pow(2, index + 1));
cellToMerge.children[0].getComponent(Block).setSpriteBlock(index);
this.cachedBlocksToMerge.length = 0;
this.cachedBlocksToMove.length = 0;
if (!hasCheckedEmptyCell) {
this.checkEmptyCell();
......@@ -367,8 +377,6 @@ export default class GameController extends cc.Component {
nodeToMove.setPosition(cc.Vec2.ZERO);
if (!hasCheckMerge) {
console.log(row, col);
this.checkMergeability(row, col);
hasCheckMerge = true;
}
......@@ -385,4 +393,45 @@ export default class GameController extends cc.Component {
this.checkMergeability(this.currentBlockRow, this.currentBlockCol);
}
}
onFindBlocksToMerge() {
const data = this.blocksData.blockData;
const blocksToMerge = [];
for (let row = 0; row < data.length; row++) {
for (let col = 0; col < data[row].length; col++) {
const currentValue = data[row][col];
if (currentValue !== 0) {
const neighbors = [
{ row: row - 1, col },
{ row: row + 1, col },
{ row, col: col - 1 },
{ row, col: col + 1 },
];
let hasDifferentValue = false;
for (const neighbor of neighbors) {
const { row: neighborRow, col: neighborCol } = neighbor;
if (
neighborRow >= 0 &&
neighborRow < data.length &&
neighborCol >= 0 &&
neighborCol < data[neighborRow].length &&
data[neighborRow][neighborCol] !== currentValue
) {
hasDifferentValue = true;
break;
}
}
if (hasDifferentValue) {
blocksToMerge.push({ row, col });
}
}
}
}
return blocksToMerge;
}
}
const { ccclass, property } = cc._decorator;
@ccclass
export default class LocalStorage extends cc.Component {
public static setHighestScore(value: number) {
cc.sys.localStorage.setItem("DropAndMergeTheNumber - HighestScore", value);
}
public static getHighestScore(): number {
if (cc.sys.localStorage.getItem("DropAndMergeTheNumber - HighestScore") == null) {
cc.sys.localStorage.setItem("DropAndMergeTheNumber - HighestScore", 0);
return 0;
} else
return JSON.parse(
cc.sys.localStorage.getItem("DropAndMergeTheNumber - HighestScore")
);
}
public static setMusic(value: boolean) {
cc.sys.localStorage.setItem("DropAndMergeTheNumber - Music", value);
}
public static getMusic(): boolean {
if (cc.sys.localStorage.getItem("DropAndMergeTheNumber - Music") == null) {
cc.sys.localStorage.setItem("DropAndMergeTheNumber - Music", true);
return true;
} else
return JSON.parse(cc.sys.localStorage.getItem("DropAndMergeTheNumber - Music"));
}
}
{
"ver": "1.1.0",
"uuid": "a8d37964-b0da-4e9b-969b-997e11f46e10",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import LocalStorage from "./LocalStorage";
const { ccclass, property } = cc._decorator;
@ccclass
export default class Score extends cc.Component {
@property(cc.Node) highScoreLbl: cc.Node = null;
currentScore: number = 0;
highestScore: number = LocalStorage.getHighestScore();
protected onLoad(): void {
this.highScoreLbl.getComponent(cc.Label).string =
this.highestScore.toString();
}
setScore(score: number) {
this.currentScore += score;
this.node.getComponent(cc.Label).string = this.currentScore.toString();
if (this.currentScore > this.highestScore) {
LocalStorage.setHighestScore(this.currentScore);
this.highScoreLbl.getComponent(cc.Label).string =
this.currentScore.toString();
}
}
}
{
"ver": "1.1.0",
"uuid": "f49e7478-16c4-4ece-9adb-267dc091e28f",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -19,6 +19,9 @@ export default class Block extends cc.Component {
protected update(dt: number): void {
if (this.isPlace) return;
if (!GameController.instance.isGamePaused) {
this.node.y -= dt * 100;
}
if (this.isAtEndOfColumn()) {
this.isPlace = true;
......@@ -28,7 +31,6 @@ export default class Block extends cc.Component {
this.currentBlockColumn
);
}
this.node.y -= dt * 100;
}
setSpriteBlock(index: number) {
......
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