Commit b9273da3 authored by yu's avatar yu

11.2调整

parent 2354ccff
......@@ -23,7 +23,7 @@ export default class Clund_06 extends cc.Component {
});
pg.event.on("stop_shoot", () => {
this.node.x = 0;
this.node.y = -542;
// this.node.y = -542;
this.node.angle = 0;
this.runShoot = false;
})
......@@ -34,7 +34,7 @@ export default class Clund_06 extends cc.Component {
protected update(dt) {
if (!this.runShoot) return;
//子弹位移
let speed = 10;
let speed = 25;
let nextPos = this.angleAndDistance2Point(this.jAngle, speed);
this.node.x += nextPos.x;
this.node.y += nextPos.y;
......
......@@ -84,28 +84,28 @@
"__id__": 66
},
{
"__id__": 81
"__id__": 84
},
{
"__id__": 111
"__id__": 114
},
{
"__id__": 128
"__id__": 131
},
{
"__id__": 142
"__id__": 145
}
],
"_active": true,
"_components": [
{
"__id__": 150
"__id__": 153
},
{
"__id__": 151
"__id__": 154
},
{
"__id__": 152
"__id__": 155
}
],
"_prefab": null,
......@@ -3071,13 +3071,16 @@
"__id__": 72
},
{
"__id__": 77
"__id__": 75
},
{
"__id__": 80
}
],
"_active": true,
"_components": [
{
"__id__": 80
"__id__": 83
}
],
"_prefab": null,
......@@ -3219,7 +3222,7 @@
},
{
"__type__": "cc.Node",
"_name": "jian",
"_name": "btn_touch",
"_objFlags": 0,
"_parent": {
"__id__": 66
......@@ -3243,6 +3246,166 @@
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-960,
-540,
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": "9fHzAmuTNExq6mCIATbwN4"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1920,
"_originalHeight": 1080,
"_id": "87fW0lfGFMQKyuSl0adqfz"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "ffwBta6DVJiZItFSXX52kN"
},
{
"__type__": "cc.Node",
"_name": "jian",
"_objFlags": 0,
"_parent": {
"__id__": 66
},
"_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": 82,
......@@ -3287,7 +3450,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
"__id__": 72
},
"_enabled": true,
"_materials": [
......@@ -3319,7 +3482,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
"__id__": 72
},
"_enabled": true,
"_id": "32TaQy7vtMOpCq5j8PwuQC"
......@@ -3333,16 +3496,16 @@
},
"_children": [
{
"__id__": 73
"__id__": 76
}
],
"_active": true,
"_components": [
{
"__id__": 75
"__id__": 78
},
{
"__id__": 76
"__id__": 79
}
],
"_prefab": null,
......@@ -3362,14 +3525,14 @@
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
"y": 0.34
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-963.9719999999998,
-993.2519999999997,
0,
0,
0,
......@@ -3398,13 +3561,13 @@
"_name": "word",
"_objFlags": 0,
"_parent": {
"__id__": 72
"__id__": 75
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 74
"__id__": 77
}
],
"_prefab": null,
......@@ -3431,7 +3594,7 @@
"ctor": "Float64Array",
"array": [
0,
56.137,
85.622,
0,
0,
0,
......@@ -3460,7 +3623,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 73
"__id__": 76
},
"_enabled": true,
"_materials": [
......@@ -3470,13 +3633,13 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "",
"_N$string": "",
"_string": "abc",
"_N$string": "abc",
"_fontSize": 50,
"_lineHeight": 50,
"_enableWrapText": false,
"_N$file": {
"__uuid__": "05daf70a-ce79-4667-af1a-553bab8a74de"
"__uuid__": "20f899bd-9054-4f00-bfc4-5c904e22b6e9"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
......@@ -3495,7 +3658,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 75
},
"_enabled": true,
"_materials": [
......@@ -3527,7 +3690,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 75
},
"_enabled": true,
"alignMode": 1,
......@@ -3551,7 +3714,7 @@
},
{
"__type__": "cc.Node",
"_name": "btn_touch",
"_name": "gong_touch",
"_objFlags": 0,
"_parent": {
"__id__": 66
......@@ -3560,10 +3723,10 @@
"_active": true,
"_components": [
{
"__id__": 78
"__id__": 81
},
{
"__id__": 79
"__id__": 82
}
],
"_prefab": null,
......@@ -3577,20 +3740,20 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
"width": 470,
"height": 230
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-960,
-540,
0,
-425,
0,
0,
0,
......@@ -3612,41 +3775,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "9fHzAmuTNExq6mCIATbwN4"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1920,
"_originalHeight": 1080,
"_id": "87fW0lfGFMQKyuSl0adqfz"
"_id": "9dycIBlilJ5rLcXkUYWMO8"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
"__id__": 80
},
"_enabled": true,
"_normalMaterial": null,
......@@ -3707,19 +3843,19 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "ffwBta6DVJiZItFSXX52kN"
"_id": "ccf49HMYVG3aSj1mvKQFl1"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 66
"__id__": 80
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_alignFlags": 4,
"_left": 0,
"_right": 0,
"_top": 0,
......@@ -3732,7 +3868,34 @@
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1207,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "dd8ATX7KRICZ47ewYE2dL/"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 66
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1207,
"_originalHeight": 339,
"_id": "b9SQrznxlHop+lSwR19L1d"
},
......@@ -3745,19 +3908,19 @@
},
"_children": [
{
"__id__": 82
"__id__": 85
},
{
"__id__": 100
"__id__": 103
},
{
"__id__": 108
"__id__": 111
}
],
"_active": false,
"_components": [
{
"__id__": 110
"__id__": 113
}
],
"_prefab": null,
......@@ -3813,38 +3976,38 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 81
"__id__": 84
},
"_children": [
{
"__id__": 83
"__id__": 86
},
{
"__id__": 85
"__id__": 88
},
{
"__id__": 87
"__id__": 90
},
{
"__id__": 89
"__id__": 92
},
{
"__id__": 91
"__id__": 94
},
{
"__id__": 93
"__id__": 96
},
{
"__id__": 95
"__id__": 98
},
{
"__id__": 97
"__id__": 100
}
],
"_active": true,
"_components": [
{
"__id__": 99
"__id__": 102
}
],
"_prefab": null,
......@@ -3858,8 +4021,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 303,
"height": 425
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3900,13 +4063,13 @@
"_name": "balloon1",
"_objFlags": 0,
"_parent": {
"__id__": 82
"__id__": 85
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 84
"__id__": 87
}
],
"_prefab": null,
......@@ -3962,7 +4125,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
"__id__": 86
},
"_enabled": true,
"_materials": [
......@@ -3994,13 +4157,13 @@
"_name": "balloon2",
"_objFlags": 0,
"_parent": {
"__id__": 82
"__id__": 85
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 86
"__id__": 89
}
],
"_prefab": null,
......@@ -4056,7 +4219,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 85
"__id__": 88
},
"_enabled": true,
"_materials": [
......@@ -4088,13 +4251,13 @@
"_name": "balloon3",
"_objFlags": 0,
"_parent": {
"__id__": 82
"__id__": 85
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 88
"__id__": 91
}
],
"_prefab": null,
......@@ -4150,7 +4313,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
"__id__": 90
},
"_enabled": true,
"_materials": [
......@@ -4182,13 +4345,13 @@
"_name": "balloon4",
"_objFlags": 0,
"_parent": {
"__id__": 82
"__id__": 85
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 90
"__id__": 93
}
],
"_prefab": null,
......@@ -4244,7 +4407,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
"__id__": 92
},
"_enabled": true,
"_materials": [
......@@ -4276,13 +4439,13 @@
"_name": "balloon5",
"_objFlags": 0,
"_parent": {
"__id__": 82
"__id__": 85
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 92
"__id__": 95
}
],
"_prefab": null,
......@@ -4338,7 +4501,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
"__id__": 94
},
"_enabled": true,
"_materials": [
......@@ -4370,13 +4533,13 @@
"_name": "balloon6",
"_objFlags": 0,
"_parent": {
"__id__": 82
"__id__": 85
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 94
"__id__": 97
}
],
"_prefab": null,
......@@ -4432,7 +4595,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
"__id__": 96
},
"_enabled": true,
"_materials": [
......@@ -4464,13 +4627,13 @@
"_name": "balloon7",
"_objFlags": 0,
"_parent": {
"__id__": 82
"__id__": 85
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 96
"__id__": 99
}
],
"_prefab": null,
......@@ -4526,7 +4689,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 95
"__id__": 98
},
"_enabled": true,
"_materials": [
......@@ -4558,13 +4721,13 @@
"_name": "balloon8",
"_objFlags": 0,
"_parent": {
"__id__": 82
"__id__": 85
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 98
"__id__": 101
}
],
"_prefab": null,
......@@ -4620,7 +4783,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
"__id__": 100
},
"_enabled": true,
"_materials": [
......@@ -4652,7 +4815,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 82
"__id__": 85
},
"_enabled": true,
"alignMode": 1,
......@@ -4679,20 +4842,20 @@
"_name": "layout",
"_objFlags": 0,
"_parent": {
"__id__": 81
"__id__": 84
},
"_children": [
{
"__id__": 101
"__id__": 104
},
{
"__id__": 103
"__id__": 106
}
],
"_active": true,
"_components": [
{
"__id__": 107
"__id__": 110
}
],
"_prefab": null,
......@@ -4748,13 +4911,13 @@
"_name": "pic",
"_objFlags": 0,
"_parent": {
"__id__": 100
"__id__": 103
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 102
"__id__": 105
}
],
"_prefab": null,
......@@ -4810,7 +4973,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
"__id__": 104
},
"_enabled": true,
"_materials": [
......@@ -4842,17 +5005,17 @@
"_name": "word_bg",
"_objFlags": 0,
"_parent": {
"__id__": 100
"__id__": 103
},
"_children": [
{
"__id__": 104
"__id__": 107
}
],
"_active": false,
"_components": [
{
"__id__": 106
"__id__": 109
}
],
"_prefab": null,
......@@ -4908,13 +5071,13 @@
"_name": "word",
"_objFlags": 0,
"_parent": {
"__id__": 103
"__id__": 106
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 105
"__id__": 108
}
],
"_prefab": null,
......@@ -4970,7 +5133,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 107
},
"_enabled": true,
"_materials": [
......@@ -5005,7 +5168,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 103
"__id__": 106
},
"_enabled": true,
"_materials": [
......@@ -5037,7 +5200,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
"__id__": 103
},
"_enabled": true,
"_layoutSize": {
......@@ -5069,13 +5232,13 @@
"_name": "bomb",
"_objFlags": 0,
"_parent": {
"__id__": 81
"__id__": 84
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 109
"__id__": 112
}
],
"_prefab": null,
......@@ -5131,7 +5294,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 108
"__id__": 111
},
"_enabled": true,
"_materials": [],
......@@ -5159,7 +5322,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
"__id__": 84
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5231,19 +5394,19 @@
},
"_children": [
{
"__id__": 112
"__id__": 115
},
{
"__id__": 115
"__id__": 118
}
],
"_active": true,
"_components": [
{
"__id__": 126
"__id__": 129
},
{
"__id__": 127
"__id__": 130
}
],
"_prefab": null,
......@@ -5299,16 +5462,16 @@
"_name": "label_title",
"_objFlags": 0,
"_parent": {
"__id__": 111
"__id__": 114
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 113
"__id__": 116
},
{
"__id__": 114
"__id__": 117
}
],
"_prefab": null,
......@@ -5364,7 +5527,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 112
"__id__": 115
},
"_enabled": true,
"_materials": [
......@@ -5399,7 +5562,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 112
"__id__": 115
},
"_enabled": true,
"alignMode": 1,
......@@ -5426,17 +5589,17 @@
"_name": "layout_mouse",
"_objFlags": 0,
"_parent": {
"__id__": 111
"__id__": 114
},
"_children": [
{
"__id__": 116
"__id__": 119
}
],
"_active": true,
"_components": [
{
"__id__": 125
"__id__": 128
}
],
"_prefab": null,
......@@ -5492,20 +5655,20 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 115
"__id__": 118
},
"_children": [
{
"__id__": 117
"__id__": 120
},
{
"__id__": 119
"__id__": 122
},
{
"__id__": 121
"__id__": 124
},
{
"__id__": 123
"__id__": 126
}
],
"_active": false,
......@@ -5563,13 +5726,13 @@
"_name": "star_bg",
"_objFlags": 0,
"_parent": {
"__id__": 116
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 118
"__id__": 121
}
],
"_prefab": null,
......@@ -5625,7 +5788,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 117
"__id__": 120
},
"_enabled": true,
"_materials": [
......@@ -5657,13 +5820,13 @@
"_name": "star",
"_objFlags": 0,
"_parent": {
"__id__": 116
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 120
"__id__": 123
}
],
"_prefab": null,
......@@ -5719,7 +5882,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
"__id__": 122
},
"_enabled": true,
"_materials": [
......@@ -5751,13 +5914,13 @@
"_name": "icon_bigstar",
"_objFlags": 0,
"_parent": {
"__id__": 116
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 122
"__id__": 125
}
],
"_prefab": null,
......@@ -5813,7 +5976,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 121
"__id__": 124
},
"_enabled": true,
"_materials": [
......@@ -5845,13 +6008,13 @@
"_name": "star_wrong",
"_objFlags": 0,
"_parent": {
"__id__": 116
"__id__": 119
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 124
"__id__": 127
}
],
"_prefab": null,
......@@ -5907,7 +6070,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 123
"__id__": 126
},
"_enabled": true,
"_materials": [
......@@ -5939,7 +6102,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 115
"__id__": 118
},
"_enabled": true,
"position": {
......@@ -5960,7 +6123,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"__id__": 114
},
"_enabled": true,
"_materials": [
......@@ -5992,7 +6155,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"__id__": 114
},
"_enabled": true,
"alignMode": 1,
......@@ -6023,22 +6186,22 @@
},
"_children": [
{
"__id__": 129
"__id__": 132
},
{
"__id__": 133
"__id__": 136
},
{
"__id__": 135
"__id__": 138
},
{
"__id__": 138
"__id__": 141
}
],
"_active": false,
"_components": [
{
"__id__": 141
"__id__": 144
}
],
"_prefab": null,
......@@ -6094,19 +6257,19 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 128
"__id__": 131
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 130
"__id__": 133
},
{
"__id__": 131
"__id__": 134
},
{
"__id__": 132
"__id__": 135
}
],
"_prefab": null,
......@@ -6162,7 +6325,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 132
},
"_enabled": true,
"_materials": [
......@@ -6194,7 +6357,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 132
},
"_enabled": true,
"alignMode": 1,
......@@ -6221,7 +6384,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 132
},
"_enabled": true,
"_normalMaterial": null,
......@@ -6289,13 +6452,13 @@
"_name": "finish_db",
"_objFlags": 0,
"_parent": {
"__id__": 128
"__id__": 131
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 134
"__id__": 137
}
],
"_prefab": null,
......@@ -6351,7 +6514,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 133
"__id__": 136
},
"_enabled": true,
"_materials": [
......@@ -6391,16 +6554,16 @@
"_name": "btn_again",
"_objFlags": 0,
"_parent": {
"__id__": 128
"__id__": 131
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 136
"__id__": 139
},
{
"__id__": 137
"__id__": 140
}
],
"_prefab": null,
......@@ -6456,7 +6619,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 138
},
"_enabled": true,
"_materials": [
......@@ -6488,7 +6651,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 138
},
"_enabled": true,
"_normalMaterial": null,
......@@ -6556,16 +6719,16 @@
"_name": "btn_next",
"_objFlags": 0,
"_parent": {
"__id__": 128
"__id__": 131
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 139
"__id__": 142
},
{
"__id__": 140
"__id__": 143
}
],
"_prefab": null,
......@@ -6621,7 +6784,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 138
"__id__": 141
},
"_enabled": true,
"_materials": [
......@@ -6653,7 +6816,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 138
"__id__": 141
},
"_enabled": true,
"_normalMaterial": null,
......@@ -6721,7 +6884,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 128
"__id__": 131
},
"_enabled": true,
"alignMode": 1,
......@@ -6752,16 +6915,16 @@
},
"_children": [
{
"__id__": 143
"__id__": 146
},
{
"__id__": 147
"__id__": 150
}
],
"_active": false,
"_components": [
{
"__id__": 149
"__id__": 152
}
],
"_prefab": null,
......@@ -6817,19 +6980,19 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 142
"__id__": 145
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 144
"__id__": 147
},
{
"__id__": 145
"__id__": 148
},
{
"__id__": 146
"__id__": 149
}
],
"_prefab": null,
......@@ -6885,7 +7048,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 143
"__id__": 146
},
"_enabled": true,
"_materials": [
......@@ -6917,7 +7080,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 143
"__id__": 146
},
"_enabled": true,
"_normalMaterial": null,
......@@ -6985,7 +7148,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 143
"__id__": 146
},
"_enabled": true,
"alignMode": 1,
......@@ -7012,13 +7175,13 @@
"_name": "start_ske",
"_objFlags": 0,
"_parent": {
"__id__": 142
"__id__": 145
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 148
"__id__": 151
}
],
"_prefab": null,
......@@ -7074,7 +7237,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 147
"__id__": 150
},
"_enabled": true,
"_materials": [
......@@ -7110,7 +7273,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 142
"__id__": 145
},
"_enabled": true,
"alignMode": 1,
......@@ -7188,25 +7351,25 @@
"__id__": 66
},
"balloon_item": {
"__id__": 81
"__id__": 84
},
"layout_balloon": {
"__id__": 67
},
"jian_item": {
"__id__": 69
"__id__": 72
},
"gong_item": {
"__id__": 72
"__id__": 75
},
"layout_start": {
"__id__": 142
"__id__": 145
},
"layout_finish": {
"__id__": 128
"__id__": 131
},
"gong_word": {
"__id__": 73
"__id__": 76
},
"_id": "dfknLfL6tLKoTV2dd1uvh+"
}
......
......@@ -64,6 +64,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
onLoadEnd() {
cc.macro.ENABLE_MULTI_TOUCH = false;//禁用多指操作
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initData();
this.initView();
......@@ -118,7 +119,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
let btn_next = cc.find("layout_finish/btn_next", this.node);
btn_again.on(cc.Node.EventType.TOUCH_END, this.onAgain, this);
btn_next.on(cc.Node.EventType.TOUCH_END, this.onNext, this);
cc.find("btn_touch", this.layout_game).on(cc.Node.EventType.TOUCH_END, this.onLayoutTouch, this);
let btn_touch = cc.find("btn_touch", this.layout_game);
btn_touch.on(cc.Node.EventType.TOUCH_END, this.onLayoutTouch, this);
btn_touch.on(cc.Node.EventType.TOUCH_START, this.onLayoutStart, this);
btn_touch.on(cc.Node.EventType.TOUCH_MOVE, this.onLayoutMove, this);
cc.find("gong_touch", this.layout_game).on(cc.Node.EventType.TOUCH_END, this.onGongBullet, this);
pg.event.on("game_start", () => {
this.gameStart();
});
......@@ -132,7 +137,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
// }
});
pg.event.on("bullet_reset_pos", () => {
const gameCanvas = cc.view.getVisibleSize();
let gameWidthX = gameCanvas.width;
let gameHeightX = gameCanvas.height
this.touching = false;
this.gong_item.angle = 0;
this.jian_item.y = -gameHeightX / 2 - 30;
});
}
private resetGame() {
......@@ -155,15 +165,32 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
private onLayoutTouch(e) {
if (this.touching) return;
this.touching = true;
this.gongAngle(e)
}
private onLayoutStart(e) {
this.gongAngle(e)
}
private onLayoutMove(e) {
this.gongAngle(e)
}
private gongAngle(e) {
this.jian_item.angle = 0;
let point = e.touch.getLocation();
let jp = cc.v2(point.x - this.layout_balloon.width / 2, point.y - this.layout_balloon.height / 2);
let lefP = cc.v2(0, -542);
let angle = this.getDegree(lefP, jp);
// this.jian_item.angle = angle;
if (angle > 80) angle = 80;
if (angle < -80) angle = -80;
this.gong_item.angle = angle;
this.jian_item.angle = angle;
}
private onGongBullet() {
if (this.touching) return;
this.touching = true;
let angle = this.jian_item.angle;
this.playLocalAudio("gShow");
pg.event.emit("bullet_shoot", angle);
}
private gameOver() {
......@@ -185,7 +212,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.lastCount = null;
this.touchFishs = [];
this.layout_balloon.removeAllChildren();
this.playLocalAudio("gShow");
this.showEnter().then(() => {
this.showQuestion();
});
......@@ -203,9 +229,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.gong_item.y = -900;
this.jian_item.y = -900;
return new Promise((resolve, reject) => {
cc.tween(this.gong_item).to(0.5, { y: -gameHeightX / 2 + 30 })
cc.tween(this.gong_item).to(0.5, { y: -gameHeightX / 2 - 30 })
.call(() => {
cc.tween(this.jian_item).to(0.5, { y: -gameHeightX / 2 }).start();
cc.tween(this.jian_item).to(0.5, { y: -gameHeightX / 2 - 30 }).start();
pg.audio.playAudioByUrl(question.audio);
cc.tween(this.gong_word).to(0.3, { opacity: 255, scale: 1 })
.call(() => {
......@@ -279,7 +305,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
update(dt) {
if (Game.getIns().state != GAME_STATE.RUNNING) return;
// if (this.touching) return;
if (this.fishLen < 5) this.count++;
if (this.fishLen < 6) this.count++;
let fish = this.getFishByCount(this.count);
if (fish) this.fishs.push(fish);
this.isHitBalloon();
......@@ -288,8 +314,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!this.touching) return;
this.fishs.forEach((item) => {
let dis = this.getDistances(this.jian_item, item);
if (dis < 150 && item.data.fish.isOut == FISH_OUT.RUNNING) {
if (item.x < 200 && item.x > -200 && item.y < -350) return;
if (dis < 160 && item.data.fish.isOut == FISH_OUT.RUNNING) {
if (item.x < 200 && item.x > -200 && item.y < -300) return;
pg.event.emit("stop_shoot");
cc.Tween.stopAllByTarget(item);
let state = item.data.right ? FISH_STATE.BREAK : FISH_STATE.FALL;
......@@ -318,7 +344,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.visible(pg.view.find(item, 'bomb'), true);
this.schedule(() => {
item.active = false;
}, 1);
}, 0.4);
resolve('');
break;
case FISH_STATE.FALL:
......@@ -341,7 +367,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
updateFish(item, data: Option) {
// pg.view.touchOn(item, this.onTouchItem, this);
if (!this.fishCount) this.fishCount = 0;
let id = this.fishCount % 5 + 1;
let id = this.fishCount % 6;
this.fishCount++;
// let res = pg.view.find(item, 'res');
......@@ -368,15 +394,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
let pos = [-794, -480, -160, 155, 473, 798];
item.parent = this.layout_balloon;
item.data = data;
data.fish.node = item;
//x y 起始点 和终点 进行 随机
cc.Tween.stopAllByTarget(item);
//左往右
item.x = -1334 / 2 + Math.random() * 1334;
item.y = -(720 / 2 + Math.random() * 400);//
cc.tween(item).to(7 + Math.random() * 6, { y: 1500 }).call(() => {
item.x = pos[id];//-1334 / 2 + Math.random() * 1334;
item.y = -(700 + Math.random() * 400);//
cc.tween(item).to(4 + Math.random() * 5, { y: 1000 }).call(() => {
data.fish.isOut = FISH_OUT.OUT;
this.viewFishs = this.viewFishs.filter(v => v.id != data.id);
}).start();
......@@ -540,3 +567,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
/**
* NGT06分类气球
1. 发射过程,不是点击气球,而是点击弓,然后释放弓,按角度发射箭;
2. 弓应该是旋转的,我给过示意图;
3. 弓上的字体需要加粗,看效果图;
4. 箭的速度太慢了,看我给的视频例子,这个速度就好;
5. 箭发出应该有音效;
6. 气球爆炸的图片停留的时间太久的,停留0.5秒,一闪而过就好;
7. 气球总是扎堆,需要左右分离一些留一些距离;(不是从左侧扎堆,就是从右侧扎堆)
*/
\ No newline at end of file
......@@ -28,7 +28,7 @@ export class Option {
public touchRight: boolean;
public parent;
public pairKey;
fish: any;
public fish: any;
constructor(data, id) {
this.id = id;
this.type = data.type;
......
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