Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ngt06_ball
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
ngt06_ball
Commits
b9273da3
Commit
b9273da3
authored
Nov 02, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11.2调整
parent
2354ccff
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
422 additions
and
221 deletions
+422
-221
bullet.ts
assets/ngt06_ball/scene/bullet.ts
+2
-2
ngt06_ball.fire
assets/ngt06_ball/scene/ngt06_ball.fire
+366
-203
ngt06_ball.ts
assets/ngt06_ball/scene/ngt06_ball.ts
+53
-15
Game.ts
assets/ngt06_ball/scene/tool/Game.ts
+1
-1
No files found.
assets/ngt06_ball/scene/bullet.ts
View file @
b9273da3
...
...
@@ -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
;
...
...
assets/ngt06_ball/scene/ngt06_ball.fire
View file @
b9273da3
...
...
@@ -84,28 +84,28 @@
"__id__": 66
},
{
"__id__": 8
1
"__id__": 8
4
},
{
"__id__": 11
1
"__id__": 11
4
},
{
"__id__": 1
28
"__id__": 1
31
},
{
"__id__": 14
2
"__id__": 14
5
}
],
"_active": true,
"_components": [
{
"__id__": 15
0
"__id__": 15
3
},
{
"__id__": 15
1
"__id__": 15
4
},
{
"__id__": 15
2
"__id__": 15
5
}
],
"_prefab": null,
...
...
@@ -3071,13 +3071,16 @@
"__id__": 72
},
{
"__id__": 77
"__id__": 75
},
{
"__id__": 80
}
],
"_active": true,
"_components": [
{
"__id__": 8
0
"__id__": 8
3
}
],
"_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__": 7
3
"__id__": 7
6
}
],
"_active": true,
"_components": [
{
"__id__": 7
5
"__id__": 7
8
},
{
"__id__": 7
6
"__id__": 7
9
}
],
"_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,
-9
63.9719999999998
,
-9
93.2519999999997
,
0,
0,
0,
...
...
@@ -3398,13 +3561,13 @@
"_name": "word",
"_objFlags": 0,
"_parent": {
"__id__": 7
2
"__id__": 7
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
4
"__id__": 7
7
}
],
"_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__": 7
3
"__id__": 7
6
},
"_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__": 7
2
"__id__": 7
5
},
"_enabled": true,
"_materials": [
...
...
@@ -3527,7 +3690,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
2
"__id__": 7
5
},
"_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":
192
0,
"height":
108
0
"width":
47
0,
"height":
23
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"x": 0
.5
,
"y": 0
.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-96
0,
-
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": 4
5
,
"_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__": 8
2
"__id__": 8
5
},
{
"__id__": 10
0
"__id__": 10
3
},
{
"__id__": 1
08
"__id__": 1
11
}
],
"_active": false,
"_components": [
{
"__id__": 11
0
"__id__": 11
3
}
],
"_prefab": null,
...
...
@@ -3813,38 +3976,38 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 8
1
"__id__": 8
4
},
"_children": [
{
"__id__": 8
3
"__id__": 8
6
},
{
"__id__": 8
5
"__id__": 8
8
},
{
"__id__":
87
"__id__":
90
},
{
"__id__":
89
"__id__":
92
},
{
"__id__": 9
1
"__id__": 9
4
},
{
"__id__": 9
3
"__id__": 9
6
},
{
"__id__": 9
5
"__id__": 9
8
},
{
"__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__": 8
2
"__id__": 8
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
4
"__id__": 8
7
}
],
"_prefab": null,
...
...
@@ -3962,7 +4125,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
3
"__id__": 8
6
},
"_enabled": true,
"_materials": [
...
...
@@ -3994,13 +4157,13 @@
"_name": "balloon2",
"_objFlags": 0,
"_parent": {
"__id__": 8
2
"__id__": 8
5
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 8
6
"__id__": 8
9
}
],
"_prefab": null,
...
...
@@ -4056,7 +4219,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
5
"__id__": 8
8
},
"_enabled": true,
"_materials": [
...
...
@@ -4088,13 +4251,13 @@
"_name": "balloon3",
"_objFlags": 0,
"_parent": {
"__id__": 8
2
"__id__": 8
5
},
"_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__": 8
2
"__id__": 8
5
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 9
0
"__id__": 9
3
}
],
"_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__": 8
2
"__id__": 8
5
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 9
2
"__id__": 9
5
}
],
"_prefab": null,
...
...
@@ -4338,7 +4501,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
1
"__id__": 9
4
},
"_enabled": true,
"_materials": [
...
...
@@ -4370,13 +4533,13 @@
"_name": "balloon6",
"_objFlags": 0,
"_parent": {
"__id__": 8
2
"__id__": 8
5
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 9
4
"__id__": 9
7
}
],
"_prefab": null,
...
...
@@ -4432,7 +4595,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
3
"__id__": 9
6
},
"_enabled": true,
"_materials": [
...
...
@@ -4464,13 +4627,13 @@
"_name": "balloon7",
"_objFlags": 0,
"_parent": {
"__id__": 8
2
"__id__": 8
5
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 9
6
"__id__": 9
9
}
],
"_prefab": null,
...
...
@@ -4526,7 +4689,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
5
"__id__": 9
8
},
"_enabled": true,
"_materials": [
...
...
@@ -4558,13 +4721,13 @@
"_name": "balloon8",
"_objFlags": 0,
"_parent": {
"__id__": 8
2
"__id__": 8
5
},
"_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__": 8
2
"__id__": 8
5
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -4679,20 +4842,20 @@
"_name": "layout",
"_objFlags": 0,
"_parent": {
"__id__": 8
1
"__id__": 8
4
},
"_children": [
{
"__id__": 10
1
"__id__": 10
4
},
{
"__id__": 10
3
"__id__": 10
6
}
],
"_active": true,
"_components": [
{
"__id__": 1
07
"__id__": 1
10
}
],
"_prefab": null,
...
...
@@ -4748,13 +4911,13 @@
"_name": "pic",
"_objFlags": 0,
"_parent": {
"__id__": 10
0
"__id__": 10
3
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 10
2
"__id__": 10
5
}
],
"_prefab": null,
...
...
@@ -4810,7 +4973,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
1
"__id__": 10
4
},
"_enabled": true,
"_materials": [
...
...
@@ -4842,17 +5005,17 @@
"_name": "word_bg",
"_objFlags": 0,
"_parent": {
"__id__": 10
0
"__id__": 10
3
},
"_children": [
{
"__id__": 10
4
"__id__": 10
7
}
],
"_active": false,
"_components": [
{
"__id__": 10
6
"__id__": 10
9
}
],
"_prefab": null,
...
...
@@ -4908,13 +5071,13 @@
"_name": "word",
"_objFlags": 0,
"_parent": {
"__id__": 10
3
"__id__": 10
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
5
"__id__": 10
8
}
],
"_prefab": null,
...
...
@@ -4970,7 +5133,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
4
"__id__": 10
7
},
"_enabled": true,
"_materials": [
...
...
@@ -5005,7 +5168,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
3
"__id__": 10
6
},
"_enabled": true,
"_materials": [
...
...
@@ -5037,7 +5200,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
0
"__id__": 10
3
},
"_enabled": true,
"_layoutSize": {
...
...
@@ -5069,13 +5232,13 @@
"_name": "bomb",
"_objFlags": 0,
"_parent": {
"__id__": 8
1
"__id__": 8
4
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 1
09
"__id__": 1
12
}
],
"_prefab": null,
...
...
@@ -5131,7 +5294,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
08
"__id__": 1
11
},
"_enabled": true,
"_materials": [],
...
...
@@ -5159,7 +5322,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
1
"__id__": 8
4
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -5231,19 +5394,19 @@
},
"_children": [
{
"__id__": 11
2
"__id__": 11
5
},
{
"__id__": 11
5
"__id__": 11
8
}
],
"_active": true,
"_components": [
{
"__id__": 12
6
"__id__": 12
9
},
{
"__id__": 1
27
"__id__": 1
30
}
],
"_prefab": null,
...
...
@@ -5299,16 +5462,16 @@
"_name": "label_title",
"_objFlags": 0,
"_parent": {
"__id__": 11
1
"__id__": 11
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 11
3
"__id__": 11
6
},
{
"__id__": 11
4
"__id__": 11
7
}
],
"_prefab": null,
...
...
@@ -5364,7 +5527,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
2
"__id__": 11
5
},
"_enabled": true,
"_materials": [
...
...
@@ -5399,7 +5562,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
2
"__id__": 11
5
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -5426,17 +5589,17 @@
"_name": "layout_mouse",
"_objFlags": 0,
"_parent": {
"__id__": 11
1
"__id__": 11
4
},
"_children": [
{
"__id__": 11
6
"__id__": 11
9
}
],
"_active": true,
"_components": [
{
"__id__": 12
5
"__id__": 12
8
}
],
"_prefab": null,
...
...
@@ -5492,20 +5655,20 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 11
5
"__id__": 11
8
},
"_children": [
{
"__id__": 1
17
"__id__": 1
20
},
{
"__id__": 1
19
"__id__": 1
22
},
{
"__id__": 12
1
"__id__": 12
4
},
{
"__id__": 12
3
"__id__": 12
6
}
],
"_active": false,
...
...
@@ -5563,13 +5726,13 @@
"_name": "star_bg",
"_objFlags": 0,
"_parent": {
"__id__": 11
6
"__id__": 11
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
18
"__id__": 1
21
}
],
"_prefab": null,
...
...
@@ -5625,7 +5788,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
17
"__id__": 1
20
},
"_enabled": true,
"_materials": [
...
...
@@ -5657,13 +5820,13 @@
"_name": "star",
"_objFlags": 0,
"_parent": {
"__id__": 11
6
"__id__": 11
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
0
"__id__": 12
3
}
],
"_prefab": null,
...
...
@@ -5719,7 +5882,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
19
"__id__": 1
22
},
"_enabled": true,
"_materials": [
...
...
@@ -5751,13 +5914,13 @@
"_name": "icon_bigstar",
"_objFlags": 0,
"_parent": {
"__id__": 11
6
"__id__": 11
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
2
"__id__": 12
5
}
],
"_prefab": null,
...
...
@@ -5813,7 +5976,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
1
"__id__": 12
4
},
"_enabled": true,
"_materials": [
...
...
@@ -5845,13 +6008,13 @@
"_name": "star_wrong",
"_objFlags": 0,
"_parent": {
"__id__": 11
6
"__id__": 11
9
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 12
4
"__id__": 12
7
}
],
"_prefab": null,
...
...
@@ -5907,7 +6070,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
3
"__id__": 12
6
},
"_enabled": true,
"_materials": [
...
...
@@ -5939,7 +6102,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
5
"__id__": 11
8
},
"_enabled": true,
"position": {
...
...
@@ -5960,7 +6123,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
1
"__id__": 11
4
},
"_enabled": true,
"_materials": [
...
...
@@ -5992,7 +6155,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
1
"__id__": 11
4
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -6023,22 +6186,22 @@
},
"_children": [
{
"__id__": 1
29
"__id__": 1
32
},
{
"__id__": 13
3
"__id__": 13
6
},
{
"__id__": 13
5
"__id__": 13
8
},
{
"__id__": 1
38
"__id__": 1
41
}
],
"_active": false,
"_components": [
{
"__id__": 14
1
"__id__": 14
4
}
],
"_prefab": null,
...
...
@@ -6094,19 +6257,19 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 1
28
"__id__": 1
31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
0
"__id__": 13
3
},
{
"__id__": 13
1
"__id__": 13
4
},
{
"__id__": 13
2
"__id__": 13
5
}
],
"_prefab": null,
...
...
@@ -6162,7 +6325,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
29
"__id__": 1
32
},
"_enabled": true,
"_materials": [
...
...
@@ -6194,7 +6357,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
29
"__id__": 1
32
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -6221,7 +6384,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
29
"__id__": 1
32
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -6289,13 +6452,13 @@
"_name": "finish_db",
"_objFlags": 0,
"_parent": {
"__id__": 1
28
"__id__": 1
31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
4
"__id__": 13
7
}
],
"_prefab": null,
...
...
@@ -6351,7 +6514,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
3
"__id__": 13
6
},
"_enabled": true,
"_materials": [
...
...
@@ -6391,16 +6554,16 @@
"_name": "btn_again",
"_objFlags": 0,
"_parent": {
"__id__": 1
28
"__id__": 1
31
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 13
6
"__id__": 13
9
},
{
"__id__": 1
37
"__id__": 1
40
}
],
"_prefab": null,
...
...
@@ -6456,7 +6619,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
5
"__id__": 13
8
},
"_enabled": true,
"_materials": [
...
...
@@ -6488,7 +6651,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
5
"__id__": 13
8
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -6556,16 +6719,16 @@
"_name": "btn_next",
"_objFlags": 0,
"_parent": {
"__id__": 1
28
"__id__": 1
31
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 1
39
"__id__": 1
42
},
{
"__id__": 14
0
"__id__": 14
3
}
],
"_prefab": null,
...
...
@@ -6621,7 +6784,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
38
"__id__": 1
41
},
"_enabled": true,
"_materials": [
...
...
@@ -6653,7 +6816,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
38
"__id__": 1
41
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -6721,7 +6884,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
28
"__id__": 1
31
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -6752,16 +6915,16 @@
},
"_children": [
{
"__id__": 14
3
"__id__": 14
6
},
{
"__id__": 1
47
"__id__": 1
50
}
],
"_active": false,
"_components": [
{
"__id__": 1
49
"__id__": 1
52
}
],
"_prefab": null,
...
...
@@ -6817,19 +6980,19 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 14
2
"__id__": 14
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
4
"__id__": 14
7
},
{
"__id__": 14
5
"__id__": 14
8
},
{
"__id__": 14
6
"__id__": 14
9
}
],
"_prefab": null,
...
...
@@ -6885,7 +7048,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
3
"__id__": 14
6
},
"_enabled": true,
"_materials": [
...
...
@@ -6917,7 +7080,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
3
"__id__": 14
6
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -6985,7 +7148,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
3
"__id__": 14
6
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -7012,13 +7175,13 @@
"_name": "start_ske",
"_objFlags": 0,
"_parent": {
"__id__": 14
2
"__id__": 14
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
48
"__id__": 1
51
}
],
"_prefab": null,
...
...
@@ -7074,7 +7237,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
47
"__id__": 1
50
},
"_enabled": true,
"_materials": [
...
...
@@ -7110,7 +7273,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
2
"__id__": 14
5
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -7188,25 +7351,25 @@
"__id__": 66
},
"balloon_item": {
"__id__": 8
1
"__id__": 8
4
},
"layout_balloon": {
"__id__": 67
},
"jian_item": {
"__id__":
69
"__id__":
72
},
"gong_item": {
"__id__": 7
2
"__id__": 7
5
},
"layout_start": {
"__id__": 14
2
"__id__": 14
5
},
"layout_finish": {
"__id__": 1
28
"__id__": 1
31
},
"gong_word": {
"__id__": 7
3
"__id__": 7
6
},
"_id": "dfknLfL6tLKoTV2dd1uvh+"
}
...
...
assets/ngt06_ball/scene/ngt06_ball.ts
View file @
b9273da3
...
...
@@ -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
<
1
5
0
&&
item
.
data
.
fish
.
isOut
==
FISH_OUT
.
RUNNING
)
{
if
(
item
.
x
<
200
&&
item
.
x
>
-
200
&&
item
.
y
<
-
3
5
0
)
return
;
if
(
dis
<
1
6
0
&&
item
.
data
.
fish
.
isOut
==
FISH_OUT
.
RUNNING
)
{
if
(
item
.
x
<
200
&&
item
.
x
>
-
200
&&
item
.
y
<
-
3
0
0
)
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
=
-
(
7
20
/
2
+
Math
.
random
()
*
400
);
//
cc
.
tween
(
item
).
to
(
7
+
Math
.
random
()
*
6
,
{
y
:
15
00
}).
call
(()
=>
{
item
.
x
=
pos
[
id
];
//
-1334 / 2 + Math.random() * 1334;
item
.
y
=
-
(
7
00
+
Math
.
random
()
*
400
);
//
cc
.
tween
(
item
).
to
(
4
+
Math
.
random
()
*
5
,
{
y
:
10
00
}).
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
assets/ngt06_ball/scene/tool/Game.ts
View file @
b9273da3
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment