Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fireballoon
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
fireballoon
Commits
eb5fe7d3
Commit
eb5fe7d3
authored
May 21, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5.21调整
parent
bf10a216
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
163 additions
and
78 deletions
+163
-78
fireballoon.fire
assets/fireballoon/scene/fireballoon.fire
+141
-68
fireballoon.ts
assets/fireballoon/scene/fireballoon.ts
+18
-7
pg.ts
assets/fireballoon/scene/tool/pg.ts
+4
-3
No files found.
assets/fireballoon/scene/fireballoon.fire
View file @
eb5fe7d3
...
@@ -84,25 +84,25 @@
...
@@ -84,25 +84,25 @@
"__id__": 111
"__id__": 111
},
},
{
{
"__id__": 11
7
"__id__": 11
9
},
},
{
{
"__id__": 12
7
"__id__": 12
9
},
},
{
{
"__id__": 13
6
"__id__": 13
8
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
47
"__id__": 1
50
},
},
{
{
"__id__": 1
48
"__id__": 1
51
},
},
{
{
"__id__": 1
49
"__id__": 1
52
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1263,7 +1263,7 @@
...
@@ -1263,7 +1263,7 @@
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
"__uuid__": "
c560f528-e166-4884-a854-a9b03f53c904
"
"__uuid__": "
1eb56abf-3596-4a13-904a-7f7310eb738f
"
},
},
"_volume": 1,
"_volume": 1,
"_mute": false,
"_mute": false,
...
@@ -5467,7 +5467,10 @@
...
@@ -5467,7 +5467,10 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 116
"__id__": 117
},
{
"__id__": 118
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5481,8 +5484,8 @@
...
@@ -5481,8 +5484,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
0
,
"width":
1334
,
"height": 0
"height":
75
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -5534,6 +5537,9 @@
...
@@ -5534,6 +5537,9 @@
"_components": [
"_components": [
{
{
"__id__": 115
"__id__": 115
},
{
"__id__": 116
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5559,8 +5565,8 @@
...
@@ -5559,8 +5565,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
395.617
,
-
401
,
306.737
,
262.075
,
0,
0,
0,
0,
0,
0,
...
@@ -5711,6 +5717,33 @@
...
@@ -5711,6 +5717,33 @@
"_atlas": null,
"_atlas": null,
"_id": "48pAdz7GdG36mcICjWyJGN"
"_id": "48pAdz7GdG36mcICjWyJGN"
},
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 112
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 100,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "606WdhjQNIXJSuBiEVT4vE"
},
{
{
"__type__": "6ea01SYgd1PcYj1tSJPXX7+",
"__type__": "6ea01SYgd1PcYj1tSJPXX7+",
"_name": "",
"_name": "",
...
@@ -5721,6 +5754,33 @@
...
@@ -5721,6 +5754,33 @@
"_enabled": true,
"_enabled": true,
"_id": "78N5o1/GhHa5t0r3SoI14W"
"_id": "78N5o1/GhHa5t0r3SoI14W"
},
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
},
"_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": 0,
"_originalHeight": 0,
"_id": "20ZQJe+yVGroBlmb3D51f+"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "layout_start",
"_name": "layout_start",
...
@@ -5729,9 +5789,6 @@
...
@@ -5729,9 +5789,6 @@
"__id__": 2
"__id__": 2
},
},
"_children": [
"_children": [
{
"__id__": 118
},
{
{
"__id__": 120
"__id__": 120
},
},
...
@@ -5740,6 +5797,9 @@
...
@@ -5740,6 +5797,9 @@
},
},
{
{
"__id__": 124
"__id__": 124
},
{
"__id__": 126
}
}
],
],
"_active": false,
"_active": false,
...
@@ -5797,13 +5857,13 @@
...
@@ -5797,13 +5857,13 @@
"_name": "New Sprite(Splash)",
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
7
"__id__": 11
9
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
19
"__id__": 1
21
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5859,7 +5919,7 @@
...
@@ -5859,7 +5919,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
18
"__id__": 1
20
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -5891,13 +5951,13 @@
...
@@ -5891,13 +5951,13 @@
"_name": "bg_instructions",
"_name": "bg_instructions",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
7
"__id__": 11
9
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 12
1
"__id__": 12
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5953,7 +6013,7 @@
...
@@ -5953,7 +6013,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 12
0
"__id__": 12
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -5985,13 +6045,13 @@
...
@@ -5985,13 +6045,13 @@
"_name": "desc",
"_name": "desc",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
7
"__id__": 11
9
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 12
3
"__id__": 12
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6047,7 +6107,7 @@
...
@@ -6047,7 +6107,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 12
2
"__id__": 12
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6082,16 +6142,16 @@
...
@@ -6082,16 +6142,16 @@
"_name": "btn_start",
"_name": "btn_start",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
7
"__id__": 11
9
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 12
5
"__id__": 12
7
},
},
{
{
"__id__": 12
6
"__id__": 12
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6147,7 +6207,7 @@
...
@@ -6147,7 +6207,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 12
4
"__id__": 12
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6179,7 +6239,7 @@
...
@@ -6179,7 +6239,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 12
4
"__id__": 12
6
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -6240,7 +6300,7 @@
...
@@ -6240,7 +6300,7 @@
"hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"_N$target": {
"__id__": 12
4
"__id__": 12
6
},
},
"_id": "7095HuemhJQ40wHbz5jlAy"
"_id": "7095HuemhJQ40wHbz5jlAy"
},
},
...
@@ -6253,13 +6313,13 @@
...
@@ -6253,13 +6313,13 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 1
28
"__id__": 1
30
},
},
{
{
"__id__": 13
0
"__id__": 13
2
},
},
{
{
"__id__": 13
3
"__id__": 13
5
}
}
],
],
"_active": false,
"_active": false,
...
@@ -6317,13 +6377,13 @@
...
@@ -6317,13 +6377,13 @@
"_name": "speak_ske",
"_name": "speak_ske",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 12
7
"__id__": 12
9
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
29
"__id__": 1
31
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6379,7 +6439,7 @@
...
@@ -6379,7 +6439,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
28
"__id__": 1
30
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6419,16 +6479,16 @@
...
@@ -6419,16 +6479,16 @@
"_name": "btn_start",
"_name": "btn_start",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 12
7
"__id__": 12
9
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 13
1
"__id__": 13
3
},
},
{
{
"__id__": 13
2
"__id__": 13
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6484,7 +6544,7 @@
...
@@ -6484,7 +6544,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 13
0
"__id__": 13
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6516,7 +6576,7 @@
...
@@ -6516,7 +6576,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 13
0
"__id__": 13
2
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -6584,16 +6644,16 @@
...
@@ -6584,16 +6644,16 @@
"_name": "btn_stop",
"_name": "btn_stop",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 12
7
"__id__": 12
9
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 13
4
"__id__": 13
6
},
},
{
{
"__id__": 13
5
"__id__": 13
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6649,7 +6709,7 @@
...
@@ -6649,7 +6709,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 13
3
"__id__": 13
5
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6681,7 +6741,7 @@
...
@@ -6681,7 +6741,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 13
3
"__id__": 13
5
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_normalMaterial": null,
...
@@ -6753,19 +6813,19 @@
...
@@ -6753,19 +6813,19 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 13
7
"__id__": 13
9
},
},
{
{
"__id__": 1
39
"__id__": 1
42
},
},
{
{
"__id__": 14
1
"__id__": 14
4
},
},
{
{
"__id__": 14
3
"__id__": 14
6
},
},
{
{
"__id__": 14
5
"__id__": 14
8
}
}
],
],
"_active": false,
"_active": false,
...
@@ -6823,13 +6883,16 @@
...
@@ -6823,13 +6883,16 @@
"_name": "New Sprite(Splash)",
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 13
6
"__id__": 13
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 138
"__id__": 140
},
{
"__id__": 141
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6885,7 +6948,7 @@
...
@@ -6885,7 +6948,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 13
7
"__id__": 13
9
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -6912,18 +6975,28 @@
...
@@ -6912,18 +6975,28 @@
"_atlas": null,
"_atlas": null,
"_id": "a3H9UTjj1Hsql4qscDXnjg"
"_id": "a3H9UTjj1Hsql4qscDXnjg"
},
},
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 139
},
"_enabled": true,
"_id": "216u5RnsFH1riSR6qX58J/"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "img_light",
"_name": "img_light",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 13
6
"__id__": 13
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 14
0
"__id__": 14
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -6979,7 +7052,7 @@
...
@@ -6979,7 +7052,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
39
"__id__": 1
42
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -7011,13 +7084,13 @@
...
@@ -7011,13 +7084,13 @@
"_name": "img_co",
"_name": "img_co",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 13
6
"__id__": 13
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 14
2
"__id__": 14
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -7073,7 +7146,7 @@
...
@@ -7073,7 +7146,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 14
1
"__id__": 14
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -7105,13 +7178,13 @@
...
@@ -7105,13 +7178,13 @@
"_name": "img_gj",
"_name": "img_gj",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 13
6
"__id__": 13
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 14
4
"__id__": 14
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -7167,7 +7240,7 @@
...
@@ -7167,7 +7240,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 14
3
"__id__": 14
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -7199,13 +7272,13 @@
...
@@ -7199,13 +7272,13 @@
"_name": "img_ta",
"_name": "img_ta",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 13
6
"__id__": 13
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 14
6
"__id__": 14
9
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -7261,7 +7334,7 @@
...
@@ -7261,7 +7334,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 14
5
"__id__": 14
8
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -7351,10 +7424,10 @@
...
@@ -7351,10 +7424,10 @@
"__id__": 94
"__id__": 94
},
},
"layout_speak": {
"layout_speak": {
"__id__": 12
7
"__id__": 12
9
},
},
"layout_tip": {
"layout_tip": {
"__id__": 13
6
"__id__": 13
8
},
},
"item_gun": {
"item_gun": {
"__id__": 42
"__id__": 42
...
...
assets/fireballoon/scene/fireballoon.ts
View file @
eb5fe7d3
...
@@ -97,6 +97,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -97,6 +97,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
layout_start
:
cc
.
Node
;
private
layout_start
:
cc
.
Node
;
private
audioId
:
any
;
private
audioId
:
any
;
async
initView
()
{
async
initView
()
{
cc
.
audioEngine
.
stopAllEffects
();
this
.
layout_start
=
pg
.
view
.
find
(
this
,
"
layout_start
"
);
this
.
layout_start
=
pg
.
view
.
find
(
this
,
"
layout_start
"
);
this
.
layout_start
.
active
=
true
;
this
.
layout_start
.
active
=
true
;
...
@@ -325,14 +326,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -325,14 +326,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
layout
=
layout_img
;
layout
=
layout_img
;
pg
.
view
.
setNetImg
(
pg
.
view
.
find
(
layout_img
,
'
img
'
),
data
.
picUrl
,
{
w
:
440
,
h
:
286
})
pg
.
view
.
setNetImg
(
pg
.
view
.
find
(
layout_img
,
'
img
'
),
data
.
picUrl
,
{
w
:
440
,
h
:
286
})
}
}
touch
.
off
(
cc
.
Node
.
EventType
.
TOUCH_END
);
//动画效果
//动画效果
this
.
playLocalAudio
(
"
card
"
).
then
(()
=>
{
this
.
playLocalAudio
(
"
card
"
).
then
(()
=>
{
pg
.
audio
.
playAudioByUrl
(
data
.
audioUrl
);
pg
.
audio
.
playAudioByUrl
(
data
.
audioUrl
,
()
=>
{
})
touch
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
()
=>
{
touch
.
off
(
cc
.
Node
.
EventType
.
TOUCH_END
);
pg
.
audio
.
playAudioByUrl
(
data
.
audioUrl
);
touch
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
()
=>
{
})
pg
.
audio
.
playAudioByUrl
(
data
.
audioUrl
);
}
);
})
})
layout
.
active
=
true
;
layout
.
active
=
true
;
layout
.
opacity
=
255
;
layout
.
opacity
=
255
;
layout
.
scale
=
0.1
;
layout
.
scale
=
0.1
;
...
@@ -554,7 +557,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -554,7 +557,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async
recrodEnd
(
data
)
{
async
recrodEnd
(
data
)
{
Game
.
getIns
().
player
.
addVoice
(
data
);
Game
.
getIns
().
player
.
addVoice
(
data
);
let
score
=
data
.
result
.
overall
;
let
score
=
data
.
result
.
overall
;
if
(
score
>=
8
0
)
{
if
(
score
>=
7
0
)
{
//提示成功
//提示成功
this
.
updateTips
(
TIPS_STATE
.
GOOD
);
this
.
updateTips
(
TIPS_STATE
.
GOOD
);
Game
.
getIns
().
player
.
addRight
();
Game
.
getIns
().
player
.
addRight
();
...
@@ -565,7 +568,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -565,7 +568,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
this
.
tryData
.
some
(
td
=>
td
.
id
==
this
.
touchData
.
id
))
{
if
(
this
.
tryData
.
some
(
td
=>
td
.
id
==
this
.
touchData
.
id
))
{
this
.
updateTips
(
TIPS_STATE
.
COM
);
this
.
updateTips
(
TIPS_STATE
.
COM
);
this
.
touchFishs
.
push
(
this
.
touchData
);
this
.
touchFishs
.
push
(
this
.
touchData
);
this
.
tryAgain
=
false
;
if
(
this
.
tryAgain
)
{
this
.
tryAgain
=
false
;
this
.
playCard
(
null
);
this
.
updateLayoutSpeak
(
true
);
this
.
updateTips
(
null
);
this
.
touching
=
false
;
Game
.
getIns
().
state
=
GAME_STATE
.
OVER
return
pg
.
event
.
emit
(
"
game_time_over
"
);
}
}
else
{
}
else
{
this
.
updateTips
(
TIPS_STATE
.
TRY
);
this
.
updateTips
(
TIPS_STATE
.
TRY
);
this
.
tryData
.
push
(
this
.
touchData
);
this
.
tryData
.
push
(
this
.
touchData
);
...
...
assets/fireballoon/scene/tool/pg.ts
View file @
eb5fe7d3
...
@@ -518,12 +518,13 @@ let pg = {
...
@@ -518,12 +518,13 @@ let pg = {
}
}
},
},
audio
:
{
audio
:
{
playAudioByUrl
(
audio_url
)
{
playAudioByUrl
(
audio_url
,
cb
=
null
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
audio_url
)
return
resolve
(
null
);
if
(
!
audio_url
)
return
resolve
(
null
);
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
:
any
)
=>
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
:
any
)
=>
{
5
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cb
&&
cb
();
});
});
resolve
(
audioId
);
resolve
(
audioId
);
});
});
...
@@ -538,7 +539,7 @@ let pg = {
...
@@ -538,7 +539,7 @@ let pg = {
const
audioId
=
cc
.
audioEngine
.
playEffect
(
audioClip
,
false
);
const
audioId
=
cc
.
audioEngine
.
playEffect
(
audioClip
,
false
);
if
(
cb
)
{
if
(
cb
)
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cb
();
cb
&&
cb
();
});
});
}
}
...
...
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