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

07/09/2023 commit

parent 516cfdc6
......@@ -33,17 +33,17 @@
"__id__": 27
},
{
"__id__": 36
"__id__": 37
}
],
"_active": true,
"_components": [
{
"__id__": 42
"__id__": 43
}
],
"_prefab": {
"__id__": 43
"__id__": 44
},
"_opacity": 255,
"_color": {
......@@ -107,7 +107,7 @@
}
],
"_prefab": {
"__id__": 41
"__id__": 42
},
"_opacity": 255,
"_color": {
......@@ -185,7 +185,7 @@
"__id__": 27
},
{
"__id__": 36
"__id__": 37
}
],
"_id": ""
......@@ -1087,10 +1087,13 @@
},
{
"__id__": 34
},
{
"__id__": 35
}
],
"_prefab": {
"__id__": 35
"__id__": 36
},
"_opacity": 255,
"_color": {
......@@ -1360,6 +1363,32 @@
"awakeOnLoad": true,
"_id": ""
},
{
"__type__": "cc.PhysicsBoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 104,
"height": 66
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
......@@ -1381,18 +1410,18 @@
"_children": [],
"_active": true,
"_components": [
{
"__id__": 37
},
{
"__id__": 38
},
{
"__id__": 39
},
{
"__id__": 40
}
],
"_prefab": {
"__id__": 40
"__id__": 41
},
"_opacity": 255,
"_color": {
......@@ -1446,7 +1475,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
"__id__": 37
},
"_enabled": true,
"_materials": [
......@@ -1478,7 +1507,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
"__id__": 37
},
"_enabled": true,
"_type": 0,
......@@ -1503,7 +1532,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
"__id__": 37
},
"_enabled": true,
"tag": 3,
......@@ -1527,7 +1556,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 36
"__id__": 37
},
"asset": {
"__uuid__": "6673de46-a49c-4db5-8f01-3755cb2d143b"
......
......@@ -31,16 +31,19 @@
},
{
"__id__": 23
},
{
"__id__": 32
}
],
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 38
}
],
"_prefab": {
"__id__": 34
"__id__": 39
},
"_opacity": 255,
"_color": {
......@@ -104,7 +107,7 @@
}
],
"_prefab": {
"__id__": 32
"__id__": 37
},
"_opacity": 255,
"_color": {
......@@ -180,6 +183,9 @@
},
{
"__id__": 4
},
{
"__id__": 32
}
],
"_id": ""
......@@ -236,7 +242,7 @@
"ctor": "Float64Array",
"array": [
-125.515,
-27.09,
-16.448,
0,
0,
0,
......@@ -1226,6 +1232,170 @@
"fileId": "69T3odTVdOhKA7JTNdpbF7",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "Grass",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 33
},
{
"__id__": 34
},
{
"__id__": 35
}
],
"_prefab": {
"__id__": 36
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 104,
"height": 20
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-123.831,
-76.708,
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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "af891a65-5ee9-4e83-9e82-e0dac2d3f807"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"_type": 0,
"_allowSleep": false,
"_gravityScale": 1,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": true,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": ""
},
{
"__type__": "cc.PhysicsBoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 104,
"height": 20
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "aeBdIuKAJJJ5NgyScLIct+",
"sync": false
},
{
"__type__": "cc.PrefabInfo",
"root": {
......
......@@ -34,16 +34,19 @@
},
{
"__id__": 30
},
{
"__id__": 39
}
],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 45
}
],
"_prefab": {
"__id__": 41
"__id__": 46
},
"_opacity": 255,
"_color": {
......@@ -107,7 +110,7 @@
}
],
"_prefab": {
"__id__": 39
"__id__": 44
},
"_opacity": 255,
"_color": {
......@@ -186,6 +189,9 @@
},
{
"__id__": 30
},
{
"__id__": 39
}
],
"_id": ""
......@@ -242,7 +248,7 @@
"ctor": "Float64Array",
"array": [
7.677,
-54.18,
-39.185,
0,
0,
0,
......@@ -1469,6 +1475,170 @@
"fileId": "1e5KPDwTRAuJpJQuyBjp6H",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "Grass",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
},
{
"__id__": 41
},
{
"__id__": 42
}
],
"_prefab": {
"__id__": 43
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 104,
"height": 20
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
9.361,
-99.337,
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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "af891a65-5ee9-4e83-9e82-e0dac2d3f807"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.RigidBody",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
},
"_enabled": true,
"_type": 0,
"_allowSleep": false,
"_gravityScale": 1,
"_linearDamping": 0,
"_angularDamping": 0,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": true,
"enabledContactListener": false,
"bullet": false,
"awakeOnLoad": true,
"_id": ""
},
{
"__type__": "cc.PhysicsBoxCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
},
"_enabled": true,
"tag": 0,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"body": null,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 104,
"height": 20
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "3c5Eg38j1B9Z+sulSZtZya",
"sync": false
},
{
"__type__": "cc.PrefabInfo",
"root": {
......
......@@ -4170,8 +4170,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 284.08,
"height": 67
"width": 485,
"height": 162.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4205,7 +4205,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "4cMAA4LOlF0LRN8m7Z8N6f"
"_id": "33LF4JhN9CDJNF9rm6TDsC"
},
{
"__type__": "cc.Label",
......@@ -4222,10 +4222,10 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Notification",
"_N$string": "Notification",
"_string": "Successfully doubled coins!",
"_N$string": "Successfully doubled coins!",
"_fontSize": 50,
"_lineHeight": 50,
"_lineHeight": 70,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "0481a3d3-282a-499e-b2f1-c53edc40ac4c"
......@@ -4238,9 +4238,9 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 3,
"_N$cacheMode": 0,
"_id": "09qm0EvAxGp7U6TXNARO5F"
"_id": "52nuxe75lGtKA+524/q3LW"
},
{
"__type__": "cc.LabelOutline",
......@@ -4258,7 +4258,7 @@
"a": 255
},
"_width": 2,
"_id": "afr+WPSDxH14tm3ICyOsPT"
"_id": "db/wAbG9tNSpa00m7O129/"
},
{
"__type__": "cc.Widget",
......
......@@ -677,7 +677,7 @@
"ctor": "Float64Array",
"array": [
0,
-91.8,
-30.319,
0,
0,
0,
......@@ -737,7 +737,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -749,7 +749,7 @@
"ctor": "Float64Array",
"array": [
-250,
415,
422.5,
0,
0,
0,
......@@ -1133,7 +1133,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1145,7 +1145,7 @@
"ctor": "Float64Array",
"array": [
-125,
415,
422.5,
0,
0,
0,
......@@ -1529,7 +1529,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1541,7 +1541,7 @@
"ctor": "Float64Array",
"array": [
0,
415,
422.5,
0,
0,
0,
......@@ -1925,7 +1925,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1937,7 +1937,7 @@
"ctor": "Float64Array",
"array": [
125,
415,
422.5,
0,
0,
0,
......@@ -2321,7 +2321,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2333,7 +2333,7 @@
"ctor": "Float64Array",
"array": [
250,
415,
422.5,
0,
0,
0,
......@@ -2717,7 +2717,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2729,7 +2729,7 @@
"ctor": "Float64Array",
"array": [
-250,
260,
267.5,
0,
0,
0,
......@@ -3113,7 +3113,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3125,7 +3125,7 @@
"ctor": "Float64Array",
"array": [
-125,
260,
267.5,
0,
0,
0,
......@@ -3509,7 +3509,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3521,7 +3521,7 @@
"ctor": "Float64Array",
"array": [
0,
260,
267.5,
0,
0,
0,
......@@ -3905,7 +3905,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3917,7 +3917,7 @@
"ctor": "Float64Array",
"array": [
125,
260,
267.5,
0,
0,
0,
......@@ -4301,7 +4301,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4313,7 +4313,7 @@
"ctor": "Float64Array",
"array": [
250,
260,
267.5,
0,
0,
0,
......@@ -4697,7 +4697,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4709,7 +4709,7 @@
"ctor": "Float64Array",
"array": [
-250,
105,
112.5,
0,
0,
0,
......@@ -5093,7 +5093,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -5105,7 +5105,7 @@
"ctor": "Float64Array",
"array": [
-125,
105,
112.5,
0,
0,
0,
......@@ -5489,7 +5489,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -5501,7 +5501,7 @@
"ctor": "Float64Array",
"array": [
0,
105,
112.5,
0,
0,
0,
......@@ -5885,7 +5885,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -5897,7 +5897,7 @@
"ctor": "Float64Array",
"array": [
125,
105,
112.5,
0,
0,
0,
......@@ -6281,7 +6281,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6293,7 +6293,7 @@
"ctor": "Float64Array",
"array": [
250,
105,
112.5,
0,
0,
0,
......@@ -6677,7 +6677,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6689,7 +6689,7 @@
"ctor": "Float64Array",
"array": [
-250,
-50,
-42.5,
0,
0,
0,
......@@ -7073,7 +7073,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -7085,7 +7085,7 @@
"ctor": "Float64Array",
"array": [
-125,
-50,
-42.5,
0,
0,
0,
......@@ -7469,7 +7469,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -7481,7 +7481,7 @@
"ctor": "Float64Array",
"array": [
0,
-50,
-42.5,
0,
0,
0,
......@@ -7865,7 +7865,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -7877,7 +7877,7 @@
"ctor": "Float64Array",
"array": [
125,
-50,
-42.5,
0,
0,
0,
......@@ -8261,7 +8261,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -8273,7 +8273,7 @@
"ctor": "Float64Array",
"array": [
250,
-50,
-42.5,
0,
0,
0,
......@@ -8657,7 +8657,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -8669,7 +8669,7 @@
"ctor": "Float64Array",
"array": [
-250,
-205,
-197.5,
0,
0,
0,
......@@ -9053,7 +9053,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -9065,7 +9065,7 @@
"ctor": "Float64Array",
"array": [
-125,
-205,
-197.5,
0,
0,
0,
......@@ -9449,7 +9449,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -9461,7 +9461,7 @@
"ctor": "Float64Array",
"array": [
0,
-205,
-197.5,
0,
0,
0,
......@@ -9845,7 +9845,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -9857,7 +9857,7 @@
"ctor": "Float64Array",
"array": [
125,
-205,
-197.5,
0,
0,
0,
......@@ -10241,7 +10241,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -10253,7 +10253,7 @@
"ctor": "Float64Array",
"array": [
250,
-205,
-197.5,
0,
0,
0,
......@@ -10637,7 +10637,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -10649,7 +10649,7 @@
"ctor": "Float64Array",
"array": [
-250,
-360,
-352.5,
0,
0,
0,
......@@ -11033,7 +11033,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -11045,7 +11045,7 @@
"ctor": "Float64Array",
"array": [
-125,
-360,
-352.5,
0,
0,
0,
......@@ -11429,7 +11429,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -11441,7 +11441,7 @@
"ctor": "Float64Array",
"array": [
0,
-360,
-352.5,
0,
0,
0,
......@@ -11825,7 +11825,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -11837,7 +11837,7 @@
"ctor": "Float64Array",
"array": [
125,
-360,
-352.5,
0,
0,
0,
......@@ -12221,7 +12221,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -12233,7 +12233,7 @@
"ctor": "Float64Array",
"array": [
250,
-360,
-352.5,
0,
0,
0,
......@@ -12599,7 +12599,7 @@
"_N$cellSize": {
"__type__": "cc.Size",
"width": 100,
"height": 130
"height": 115
},
"_N$startAxis": 0,
"_N$paddingLeft": 20,
......@@ -12607,7 +12607,7 @@
"_N$paddingTop": 20,
"_N$paddingBottom": 20,
"_N$spacingX": 25,
"_N$spacingY": 25,
"_N$spacingY": 40,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
......
......@@ -6785,8 +6785,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 284.08,
"height": 67
"width": 485,
"height": 162.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6837,10 +6837,10 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Notification",
"_N$string": "Notification",
"_string": "Successfully doubled coins!",
"_N$string": "Successfully doubled coins!",
"_fontSize": 50,
"_lineHeight": 50,
"_lineHeight": 70,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "0481a3d3-282a-499e-b2f1-c53edc40ac4c"
......@@ -6853,7 +6853,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 3,
"_N$cacheMode": 0,
"_id": "3d7IdpPtRChIc8ZxHNTyEL"
},
......
......@@ -108,13 +108,13 @@
"_active": true,
"_components": [
{
"__id__": 85
"__id__": 80
},
{
"__id__": 86
"__id__": 81
},
{
"__id__": 87
"__id__": 82
}
],
"_prefab": null,
......@@ -471,7 +471,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "65a2b7d8-d4e8-4571-aedb-766db7693820"
"__uuid__": "d2abbacf-3959-4e3a-9fb7-5c1527a74dda"
},
"_type": 0,
"_sizeMode": 1,
......@@ -1704,7 +1704,7 @@
0,
0,
1,
1,
-1,
1,
0
]
......@@ -3211,29 +3211,22 @@
},
{
"__type__": "cc.Node",
"_name": "Intro",
"_name": "Opening",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 77
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 80
},
{
"__id__": 81
"__id__": 77
},
{
"__id__": 82
"__id__": 78
},
{
"__id__": 83
"__id__": 79
}
],
"_prefab": null,
......@@ -3282,126 +3275,26 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cdjfz9tR1KGagNMSd7GNIf"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 76
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 78
},
{
"__id__": 79
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 440.5,
"height": 63
},
"_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": "6dAPQo6k5LppgftUJo31S5"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "TOUCH TO START",
"_N$string": "TOUCH TO START",
"_fontSize": 50,
"_lineHeight": 50,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "0481a3d3-282a-499e-b2f1-c53edc40ac4c"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 1,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "39zrI+bwpE0IR3DzoBxIdK"
"_id": "4dhITFmNZEkaikU4gA+CxM"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
"__id__": 76
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "24b303eb-80f6-41f6-a817-f6bb048c2138"
"__uuid__": "20dd64ba-ba66-4af0-9f75-d3196eca01af"
},
"_clips": [
{
"__uuid__": "24b303eb-80f6-41f6-a817-f6bb048c2138"
"__uuid__": "20dd64ba-ba66-4af0-9f75-d3196eca01af"
}
],
"playOnLoad": true,
"_id": "434rgdex9BGbtTN6xHBT0E"
"_id": "f49mgoe9pOWYhmAEtWKSU1"
},
{
"__type__": "cc.Sprite",
......@@ -3433,26 +3326,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "0f8uZ5+zNJY6Z4dAoiMvml"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "20dd64ba-ba66-4af0-9f75-d3196eca01af"
},
"_clips": [
{
"__uuid__": "20dd64ba-ba66-4af0-9f75-d3196eca01af"
}
],
"playOnLoad": false,
"_id": "98HNEYNVlOaLQER47G6CHp"
"_id": "19pEzs2rNOf4bfgxSbdLiX"
},
{
"__type__": "cc.Widget",
......@@ -3479,89 +3353,7 @@
"_isAbsVerticalCenter": true,
"_originalWidth": 640,
"_originalHeight": 1140,
"_id": "6eDDZbgRNMOrXGgZwJUOUa"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 84
}
],
"_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": "92U3JaTyFMwZhz+LiTOga4"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "221b6Awh/1PLZ7IzVb1f3El",
"handler": "onClickOpenGame",
"customEventData": ""
"_id": "361GRgLa9DwZRYparyKj6X"
},
{
"__type__": "cc.Canvas",
......
......@@ -71,14 +71,14 @@ export default class GamePlay extends cc.Component {
blockedObjects: Array<cc.Node> = new Array<cc.Node>();
earnedCoin: number = 0;
clickedNextLevel: boolean = false;
clickedAds: boolean = false;
protected onLoad(): void {
GamePlay.instance = this;
cc.director.getPhysicsManager().enabled = true;
cc.director.getCollisionManager().enabled = true;
window.addEventListener("beforeunload", this.handleGameReload);
window.addEventListener("unload", this.handleGameReload);
// cc.director.getPhysicsManager().debugDrawFlags = 1;
this.highestLevel = LocalStorage.getHighestLevel();
this.currentLevel = LocalStorage.getCurrentLevel();
......@@ -103,17 +103,11 @@ export default class GamePlay extends cc.Component {
this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchUp, this);
}
handleGameReload() {
LocalStorage.setGameStarted(false);
}
onPlayerClickAds() {
showInterstitialAd(InterstitialType.START, "doubleCoin");
}
onDestroy() {
window.removeEventListener("beforeunload", this.handleGameReload);
window.removeEventListener("unload", this.handleGameReload);
if (!this.clickedAds) {
showInterstitialAd(InterstitialType.START, "doubleCoin");
this.clickedAds = true;
}
}
onShowNotiAds(status: string) {
......@@ -374,6 +368,9 @@ export default class GamePlay extends cc.Component {
onStartCountdown() {
this.timerLabel.string = Math.floor(this.countdown).toString();
if (!Dog.instance.attacked && this.countdown <= 1)
return this.onLevelCompleted(this.currentLevel);
if (this.countdown > 0 && this.isGameover) {
this.startCount = false;
......@@ -381,10 +378,6 @@ export default class GamePlay extends cc.Component {
this.onReloadLevel();
}, 2);
}
if (!Dog.instance.attacked && this.countdown <= 1) {
this.startCount = false;
this.onLevelCompleted(this.currentLevel);
}
}
onReloadLevel() {
......@@ -399,6 +392,7 @@ export default class GamePlay extends cc.Component {
SoundController.playNoLoopSound(SoundController.instance.sounds[13]);
SoundController.playNoLoopSound(SoundController.instance.sounds[10]);
this.startCount = false;
this.isCompleted = true;
StageController.instance.onCompleted();
if (this.currentLevel + 1 == this.highestLevel) {
......@@ -409,26 +403,28 @@ export default class GamePlay extends cc.Component {
let levelName = parseInt(this.prefabToLoad[level].name);
if (LimitBar.instance.winStar == 3) {
this.earnedCoin = Math.floor(Math.random() * 6) + 25;
this.coinEarned.getComponent(cc.Label).string = `x${this.earnedCoin}`;
if (LocalStorage.getStarAtLevel(levelName) >= 3) return;
LocalStorage.setStarAtLevel(levelName, 3);
this.earnedCoin = Math.floor(Math.random() * 6) + 25;
}
if (LimitBar.instance.winStar == 2) {
this.earnedCoin = Math.floor(Math.random() * 6) + 20;
this.coinEarned.getComponent(cc.Label).string = `x${this.earnedCoin}`;
this.rewardSprite.getComponent(cc.Sprite).spriteFrame =
this.starWinSprites[1];
if (LocalStorage.getStarAtLevel(levelName) >= 2) return;
LocalStorage.setStarAtLevel(levelName, 2);
this.earnedCoin = Math.floor(Math.random() * 6) + 20;
}
if (LimitBar.instance.winStar == 1) {
this.earnedCoin = Math.floor(Math.random() * 6) + 15;
this.coinEarned.getComponent(cc.Label).string = `x${this.earnedCoin}`;
this.rewardSprite.getComponent(cc.Sprite).spriteFrame =
this.starWinSprites[0];
if (LocalStorage.getStarAtLevel(levelName) >= 1) return;
LocalStorage.setStarAtLevel(levelName, 1);
this.earnedCoin = Math.floor(Math.random() * 6) + 15;
}
this.coinEarned.getComponent(cc.Label).string = `x${this.earnedCoin}`;
this.updateAllStarLabel();
}
......@@ -447,10 +443,13 @@ export default class GamePlay extends cc.Component {
}
onNextLevel() {
this.onClickCollect();
this.scheduleOnce(() => {
cc.director.loadScene("gameplay");
}, 1);
if (!this.clickedNextLevel) {
this.onClickCollect();
this.scheduleOnce(() => {
cc.director.loadScene("gameplay");
}, 1);
this.clickedNextLevel = true;
}
}
onClickButtonBack() {
......
......@@ -29,10 +29,6 @@ export default class StartScene extends cc.Component {
}
this.updateButtonSprite();
window.addEventListener("beforeunload", this.handleGameReload);
window.addEventListener("unload", this.handleGameReload);
this.isStarted = LocalStorage.getGameStarted();
if (this.isStarted) this.node.getChildByName("Intro").active = false;
this.highestUnlockedLevel = LocalStorage.getHighestLevel();
......@@ -49,27 +45,6 @@ export default class StartScene extends cc.Component {
.getComponent(cc.Label).string = `x${LocalStorage.getAllCoin()}`;
}
handleGameReload() {
LocalStorage.setGameStarted(false);
}
onDestroy() {
window.removeEventListener("beforeunload", this.handleGameReload);
window.removeEventListener("unload", this.handleGameReload);
}
onClickOpenGame() {
LocalStorage.setGameStarted(true);
this.node
.getChildByName("Intro")
.getComponent(cc.Animation)
.play("Opening");
this.scheduleOnce(() => {
this.node.getChildByName("Intro").active = false;
}, 0.6);
}
updateAllStarLabel() {
let sum = 0;
for (const item of LocalStorage.getAllStars()) {
......@@ -86,6 +61,7 @@ export default class StartScene extends cc.Component {
if (this.currentAnimation === "DogRun") {
this.currentAnimation = "DogRolling";
} else {
this.animNode.getChildByName("Dog").rotation = 0;
this.currentAnimation = "DogRun";
}
......
......@@ -2,19 +2,6 @@ const { ccclass, property } = cc._decorator;
@ccclass
export default class LocalStorage extends cc.Component {
public static setGameStarted(value: boolean) {
cc.sys.localStorage.setItem("SaveTheDoge - GameStarted", value);
}
public static getGameStarted(): boolean {
if (cc.sys.localStorage.getItem("SaveTheDoge - GameStarted") == null) {
cc.sys.localStorage.setItem("SaveTheDoge - GameStarted", false);
return false;
} else
return JSON.parse(
cc.sys.localStorage.getItem("SaveTheDoge - GameStarted")
);
}
public static setMusic(value: boolean) {
cc.sys.localStorage.setItem("SaveTheDoge - Music", value);
......@@ -22,8 +9,8 @@ export default class LocalStorage extends cc.Component {
public static getMusic(): boolean {
if (cc.sys.localStorage.getItem("SaveTheDoge - Music") == null) {
cc.sys.localStorage.setItem("SaveTheDoge - Music", true);
return true;
cc.sys.localStorage.setItem("SaveTheDoge - Music", false);
return false;
} else
return JSON.parse(cc.sys.localStorage.getItem("SaveTheDoge - Music"));
}
......
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