Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OPW_BoardGame_L5R4
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
OPW_BoardGame_L5R4
Commits
3719ae1b
Commit
3719ae1b
authored
Nov 28, 2022
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加音频
parent
3bc543da
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
413 additions
and
300 deletions
+413
-300
PronunciationTestLayer.js
...4/prefab/PronunciationTestLayer/PronunciationTestLayer.js
+3
-1
OPW_BoardGame_L5R4.fire
assets/OPW_BoardGame_L5R4/scene/OPW_BoardGame_L5R4.fire
+345
-284
OPW_BoardGame_L5R4.ts
assets/OPW_BoardGame_L5R4/scene/OPW_BoardGame_L5R4.ts
+58
-3
defaultData.ts
assets/OPW_BoardGame_L5R4/script/defaultData.ts
+7
-12
No files found.
assets/OPW_BoardGame_L5R4/prefab/PronunciationTestLayer/PronunciationTestLayer.js
View file @
3719ae1b
...
...
@@ -80,7 +80,7 @@ cc.Class({
// onLoad () {},
_timeoutID
:
null
,
isStop
:
true
,
isStop
:
null
,
start
()
{},
init
(
audio_url
,
testTime
)
{
this
.
audioBeforeTest
=
audio_url
;
...
...
@@ -120,6 +120,8 @@ cc.Class({
let
url
=
this
.
recordWaitCount
==
0
?
this
.
audioBeforeTest
:
""
;
let
cat
=
cc
.
find
(
"
cat
"
,
catBase
);
asyncPlayDragonBoneAnimation
(
cat
,
"
begin
"
,
0
);
// 录音前停止所有音频
cc
.
audioEngine
.
stopAll
();
playAudioByUrl
(
url
,
()
=>
{
if
(
this
.
isStop
)
{
return
...
...
assets/OPW_BoardGame_L5R4/scene/OPW_BoardGame_L5R4.fire
View file @
3719ae1b
...
...
@@ -90,13 +90,10 @@
"__id__": 279
},
{
"__id__": 284
},
{
"__id__": 287
"__id__": 285
},
{
"__id__":
333
"__id__":
288
},
{
"__id__": 334
...
...
@@ -105,19 +102,22 @@
"__id__": 335
},
{
"__id__": 417
"__id__": 336
},
{
"__id__": 418
}
],
"_active": true,
"_components": [
{
"__id__": 425
},
{
"__id__": 426
},
{
"__id__": 427
},
{
"__id__": 428
}
],
"_prefab": null,
...
...
@@ -13872,15 +13872,18 @@
"_children": [
{
"__id__": 280
},
{
"__id__": 282
}
],
"_active": true,
"_components": [
{
"__id__": 28
2
"__id__": 28
3
},
{
"__id__": 28
3
"__id__": 28
4
}
],
"_prefab": null,
...
...
@@ -13968,8 +13971,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-4
15.773
,
3
65.514
,
-4
09.94
,
3
71.347
,
0,
0,
0,
...
...
@@ -14033,6 +14036,64 @@
"_N$enableBatch": false,
"_id": "0bHI4khJZNmrURpK/d85Sq"
},
{
"__type__": "cc.Node",
"_name": "click",
"_objFlags": 0,
"_parent": {
"__id__": 279
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 250
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
39.375,
113.75,
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": "69sS9rHcpBr51w5xUii8c3"
},
{
"__type__": "cc.Sprite",
"_name": "",
...
...
@@ -14101,13 +14162,13 @@
},
"_children": [
{
"__id__": 28
5
"__id__": 28
6
}
],
"_active": true,
"_components": [
{
"__id__": 28
6
"__id__": 28
7
}
],
"_prefab": null,
...
...
@@ -14163,7 +14224,7 @@
"_name": "map",
"_objFlags": 0,
"_parent": {
"__id__": 28
4
"__id__": 28
5
},
"_children": [],
"_active": true,
...
...
@@ -14221,7 +14282,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
4
"__id__": 28
5
},
"_enabled": true,
"_materials": [
...
...
@@ -14265,44 +14326,44 @@
},
"_children": [
{
"__id__": 28
8
"__id__": 28
9
},
{
"__id__": 29
2
"__id__": 29
3
},
{
"__id__": 29
5
"__id__": 29
6
},
{
"__id__": 30
4
"__id__": 30
5
},
{
"__id__": 30
6
"__id__": 30
7
},
{
"__id__": 31
3
"__id__": 31
4
},
{
"__id__": 31
6
"__id__": 31
7
},
{
"__id__": 3
19
"__id__": 3
20
},
{
"__id__": 32
2
"__id__": 32
3
}
],
"_active": false,
"_components": [
{
"__id__": 33
0
"__id__": 33
1
},
{
"__id__": 33
1
"__id__": 33
2
}
],
"_prefab": {
"__id__": 33
2
"__id__": 33
3
},
"_opacity": 255,
"_color": {
...
...
@@ -14356,20 +14417,20 @@
"_name": "gray",
"_objFlags": 0,
"_parent": {
"__id__": 28
7
"__id__": 28
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
89
"__id__": 2
90
},
{
"__id__": 29
0
"__id__": 29
1
}
],
"_prefab": {
"__id__": 29
1
"__id__": 29
2
},
"_opacity": 150,
"_color": {
...
...
@@ -14423,7 +14484,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
8
"__id__": 28
9
},
"_enabled": true,
"_materials": [
...
...
@@ -14455,7 +14516,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
8
"__id__": 28
9
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -14480,7 +14541,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -14493,17 +14554,17 @@
"_name": "voice_bg",
"_objFlags": 0,
"_parent": {
"__id__": 28
7
"__id__": 28
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 29
3
"__id__": 29
4
}
],
"_prefab": {
"__id__": 29
4
"__id__": 29
5
},
"_opacity": 255,
"_color": {
...
...
@@ -14557,7 +14618,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
2
"__id__": 29
3
},
"_enabled": true,
"_materials": [
...
...
@@ -14587,7 +14648,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -14600,24 +14661,24 @@
"_name": "catBase",
"_objFlags": 0,
"_parent": {
"__id__": 28
7
"__id__": 28
8
},
"_children": [
{
"__id__": 29
6
"__id__": 29
7
},
{
"__id__":
299
"__id__":
300
}
],
"_active": true,
"_components": [
{
"__id__": 30
2
"__id__": 30
3
}
],
"_prefab": {
"__id__": 30
3
"__id__": 30
4
},
"_opacity": 255,
"_color": {
...
...
@@ -14671,17 +14732,17 @@
"_name": "cat",
"_objFlags": 0,
"_parent": {
"__id__": 29
5
"__id__": 29
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 29
7
"__id__": 29
8
}
],
"_prefab": {
"__id__": 29
8
"__id__": 29
9
},
"_opacity": 255,
"_color": {
...
...
@@ -14735,7 +14796,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
6
"__id__": 29
7
},
"_enabled": true,
"_materials": [
...
...
@@ -14773,7 +14834,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -14786,17 +14847,17 @@
"_name": "catBtn",
"_objFlags": 0,
"_parent": {
"__id__": 29
5
"__id__": 29
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 30
0
"__id__": 30
1
}
],
"_prefab": {
"__id__": 30
1
"__id__": 30
2
},
"_opacity": 255,
"_color": {
...
...
@@ -14850,7 +14911,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
299
"__id__":
300
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -14916,7 +14977,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -14929,7 +14990,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
5
"__id__": 29
6
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -14954,7 +15015,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -14967,13 +15028,13 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 28
7
"__id__": 28
8
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 30
5
"__id__": 30
6
},
"_opacity": 255,
"_color": {
...
...
@@ -15025,7 +15086,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -15038,24 +15099,24 @@
"_name": "progress",
"_objFlags": 0,
"_parent": {
"__id__": 28
7
"__id__": 28
8
},
"_children": [
{
"__id__": 30
7
"__id__": 30
8
}
],
"_active": true,
"_components": [
{
"__id__": 31
0
"__id__": 31
1
},
{
"__id__": 31
1
"__id__": 31
2
}
],
"_prefab": {
"__id__": 31
2
"__id__": 31
3
},
"_opacity": 255,
"_color": {
...
...
@@ -15109,17 +15170,17 @@
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__": 30
6
"__id__": 30
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 30
8
"__id__": 30
9
}
],
"_prefab": {
"__id__": 3
09
"__id__": 3
10
},
"_opacity": 255,
"_color": {
...
...
@@ -15173,7 +15234,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
7
"__id__": 30
8
},
"_enabled": true,
"_materials": [
...
...
@@ -15203,7 +15264,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -15216,7 +15277,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
6
"__id__": 30
7
},
"_enabled": true,
"_materials": [
...
...
@@ -15248,12 +15309,12 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
6
"__id__": 30
7
},
"_enabled": true,
"_N$totalLength": 787,
"_N$barSprite": {
"__id__": 30
8
"__id__": 30
9
},
"_N$mode": 0,
"_N$progress": 1,
...
...
@@ -15263,7 +15324,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -15276,17 +15337,17 @@
"_name": "bg_light",
"_objFlags": 0,
"_parent": {
"__id__": 28
7
"__id__": 28
8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 31
4
"__id__": 31
5
}
],
"_prefab": {
"__id__": 31
5
"__id__": 31
6
},
"_opacity": 255,
"_color": {
...
...
@@ -15340,7 +15401,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
3
"__id__": 31
4
},
"_enabled": true,
"_materials": [
...
...
@@ -15370,7 +15431,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -15383,17 +15444,17 @@
"_name": "good",
"_objFlags": 0,
"_parent": {
"__id__": 28
7
"__id__": 28
8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 31
7
"__id__": 31
8
}
],
"_prefab": {
"__id__": 31
8
"__id__": 31
9
},
"_opacity": 255,
"_color": {
...
...
@@ -15447,7 +15508,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
6
"__id__": 31
7
},
"_enabled": true,
"_materials": [
...
...
@@ -15477,7 +15538,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -15490,17 +15551,17 @@
"_name": "try",
"_objFlags": 0,
"_parent": {
"__id__": 28
7
"__id__": 28
8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 32
0
"__id__": 32
1
}
],
"_prefab": {
"__id__": 32
1
"__id__": 32
2
},
"_opacity": 255,
"_color": {
...
...
@@ -15554,7 +15615,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
19
"__id__": 3
20
},
"_enabled": true,
"_materials": [
...
...
@@ -15584,7 +15645,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -15597,20 +15658,20 @@
"_name": "audioClips",
"_objFlags": 0,
"_parent": {
"__id__": 28
7
"__id__": 28
8
},
"_children": [
{
"__id__": 32
3
"__id__": 32
4
},
{
"__id__": 32
6
"__id__": 32
7
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 3
29
"__id__": 3
30
},
"_opacity": 255,
"_color": {
...
...
@@ -15664,17 +15725,17 @@
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 32
2
"__id__": 32
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 32
4
"__id__": 32
5
}
],
"_prefab": {
"__id__": 32
5
"__id__": 32
6
},
"_opacity": 255,
"_color": {
...
...
@@ -15728,7 +15789,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
3
"__id__": 32
4
},
"_enabled": true,
"_clip": {
...
...
@@ -15745,7 +15806,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -15758,17 +15819,17 @@
"_name": "wrong",
"_objFlags": 0,
"_parent": {
"__id__": 32
2
"__id__": 32
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 32
7
"__id__": 32
8
}
],
"_prefab": {
"__id__": 32
8
"__id__": 32
9
},
"_opacity": 255,
"_color": {
...
...
@@ -15822,7 +15883,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
6
"__id__": 32
7
},
"_enabled": true,
"_clip": {
...
...
@@ -15839,7 +15900,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -15850,7 +15911,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -15863,7 +15924,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
7
"__id__": 28
8
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -15890,7 +15951,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
7
"__id__": 28
8
},
"_enabled": true,
"audioBeforeTest": "",
...
...
@@ -15901,7 +15962,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 28
7
"__id__": 28
8
},
"asset": {
"__uuid__": "87e8bdef-072f-4642-b630-352bb34d47b4"
...
...
@@ -16034,25 +16095,25 @@
},
"_children": [
{
"__id__": 33
6
"__id__": 33
7
},
{
"__id__": 3
39
"__id__": 3
40
},
{
"__id__": 34
1
"__id__": 34
2
},
{
"__id__": 34
6
"__id__": 34
7
},
{
"__id__": 38
1
"__id__": 38
2
}
],
"_active": false,
"_components": [
{
"__id__": 41
6
"__id__": 41
7
}
],
"_prefab": null,
...
...
@@ -16108,16 +16169,16 @@
"_name": "gray",
"_objFlags": 0,
"_parent": {
"__id__": 33
5
"__id__": 33
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 33
7
"__id__": 33
8
},
{
"__id__": 33
8
"__id__": 33
9
}
],
"_prefab": null,
...
...
@@ -16173,7 +16234,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
6
"__id__": 33
7
},
"_enabled": true,
"_materials": [
...
...
@@ -16205,7 +16266,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
6
"__id__": 33
7
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -16232,13 +16293,13 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 33
5
"__id__": 33
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 34
0
"__id__": 34
1
}
],
"_prefab": null,
...
...
@@ -16294,7 +16355,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
39
"__id__": 3
40
},
"_enabled": true,
"_materials": [
...
...
@@ -16326,14 +16387,14 @@
"_name": "map",
"_objFlags": 0,
"_parent": {
"__id__": 33
5
"__id__": 33
6
},
"_children": [
{
"__id__": 34
2
"__id__": 34
3
},
{
"__id__": 34
4
"__id__": 34
5
}
],
"_active": true,
...
...
@@ -16391,13 +16452,13 @@
"_name": "light",
"_objFlags": 0,
"_parent": {
"__id__": 34
1
"__id__": 34
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 34
3
"__id__": 34
4
}
],
"_prefab": null,
...
...
@@ -16453,7 +16514,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
2
"__id__": 34
3
},
"_enabled": true,
"_materials": [
...
...
@@ -16485,13 +16546,13 @@
"_name": "map",
"_objFlags": 0,
"_parent": {
"__id__": 34
1
"__id__": 34
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 34
5
"__id__": 34
6
}
],
"_prefab": null,
...
...
@@ -16547,7 +16608,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
4
"__id__": 34
5
},
"_enabled": true,
"_materials": [
...
...
@@ -16579,26 +16640,26 @@
"_name": "red",
"_objFlags": 0,
"_parent": {
"__id__": 33
5
"__id__": 33
6
},
"_children": [
{
"__id__": 34
7
"__id__": 34
8
},
{
"__id__": 35
0
"__id__": 35
1
},
{
"__id__": 36
1
"__id__": 36
2
},
{
"__id__": 36
5
"__id__": 36
6
},
{
"__id__": 37
5
"__id__": 37
6
},
{
"__id__": 3
79
"__id__": 3
80
}
],
"_active": true,
...
...
@@ -16656,11 +16717,11 @@
"_name": "people",
"_objFlags": 0,
"_parent": {
"__id__": 34
6
"__id__": 34
7
},
"_children": [
{
"__id__": 34
8
"__id__": 34
9
}
],
"_active": true,
...
...
@@ -16718,13 +16779,13 @@
"_name": "db",
"_objFlags": 0,
"_parent": {
"__id__": 34
7
"__id__": 34
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
49
"__id__": 3
50
}
],
"_prefab": null,
...
...
@@ -16780,7 +16841,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
8
"__id__": 34
9
},
"_enabled": true,
"_materials": [
...
...
@@ -16820,23 +16881,23 @@
"_name": "gems",
"_objFlags": 0,
"_parent": {
"__id__": 34
6
"__id__": 34
7
},
"_children": [
{
"__id__": 35
1
"__id__": 35
2
},
{
"__id__": 35
3
"__id__": 35
4
},
{
"__id__": 35
5
"__id__": 35
6
},
{
"__id__": 35
7
"__id__": 35
8
},
{
"__id__": 3
59
"__id__": 3
60
}
],
"_active": true,
...
...
@@ -16894,13 +16955,13 @@
"_name": "gem25",
"_objFlags": 0,
"_parent": {
"__id__": 35
0
"__id__": 35
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 35
2
"__id__": 35
3
}
],
"_prefab": null,
...
...
@@ -16956,7 +17017,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
1
"__id__": 35
2
},
"_enabled": true,
"_materials": [
...
...
@@ -16988,13 +17049,13 @@
"_name": "gem15",
"_objFlags": 0,
"_parent": {
"__id__": 35
0
"__id__": 35
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 35
4
"__id__": 35
5
}
],
"_prefab": null,
...
...
@@ -17050,7 +17111,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
3
"__id__": 35
4
},
"_enabled": true,
"_materials": [
...
...
@@ -17082,13 +17143,13 @@
"_name": "gem20",
"_objFlags": 0,
"_parent": {
"__id__": 35
0
"__id__": 35
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 35
6
"__id__": 35
7
}
],
"_prefab": null,
...
...
@@ -17144,7 +17205,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
5
"__id__": 35
6
},
"_enabled": true,
"_materials": [
...
...
@@ -17176,13 +17237,13 @@
"_name": "gem5",
"_objFlags": 0,
"_parent": {
"__id__": 35
0
"__id__": 35
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 35
8
"__id__": 35
9
}
],
"_prefab": null,
...
...
@@ -17238,7 +17299,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
7
"__id__": 35
8
},
"_enabled": true,
"_materials": [
...
...
@@ -17270,13 +17331,13 @@
"_name": "gem10",
"_objFlags": 0,
"_parent": {
"__id__": 35
0
"__id__": 35
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
0
"__id__": 36
1
}
],
"_prefab": null,
...
...
@@ -17332,7 +17393,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
59
"__id__": 3
60
},
"_enabled": true,
"_materials": [
...
...
@@ -17364,17 +17425,17 @@
"_name": "bag",
"_objFlags": 0,
"_parent": {
"__id__": 34
6
"__id__": 34
7
},
"_children": [
{
"__id__": 36
2
"__id__": 36
3
}
],
"_active": true,
"_components": [
{
"__id__": 36
4
"__id__": 36
5
}
],
"_prefab": null,
...
...
@@ -17430,13 +17491,13 @@
"_name": "score",
"_objFlags": 0,
"_parent": {
"__id__": 36
1
"__id__": 36
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
3
"__id__": 36
4
}
],
"_prefab": null,
...
...
@@ -17492,7 +17553,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
2
"__id__": 36
3
},
"_enabled": true,
"_materials": [
...
...
@@ -17525,7 +17586,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
1
"__id__": 36
2
},
"_enabled": true,
"_materials": [
...
...
@@ -17557,17 +17618,17 @@
"_name": "header",
"_objFlags": 0,
"_parent": {
"__id__": 34
6
"__id__": 34
7
},
"_children": [
{
"__id__": 36
6
"__id__": 36
7
},
{
"__id__": 36
8
"__id__": 36
9
},
{
"__id__": 37
1
"__id__": 37
2
}
],
"_active": true,
...
...
@@ -17625,13 +17686,13 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 36
5
"__id__": 36
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
7
"__id__": 36
8
}
],
"_prefab": null,
...
...
@@ -17687,7 +17748,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
6
"__id__": 36
7
},
"_enabled": true,
"_materials": [
...
...
@@ -17719,16 +17780,16 @@
"_name": "image",
"_objFlags": 0,
"_parent": {
"__id__": 36
5
"__id__": 36
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
69
"__id__": 3
70
},
{
"__id__": 37
0
"__id__": 37
1
}
],
"_prefab": null,
...
...
@@ -17784,7 +17845,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
8
"__id__": 36
9
},
"_enabled": true,
"_materials": [
...
...
@@ -17814,7 +17875,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
8
"__id__": 36
9
},
"_enabled": true,
"fixedSize": 140,
...
...
@@ -17825,17 +17886,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 36
5
"__id__": 36
6
},
"_children": [
{
"__id__": 37
2
"__id__": 37
3
}
],
"_active": false,
"_components": [
{
"__id__": 37
4
"__id__": 37
5
}
],
"_prefab": null,
...
...
@@ -17891,13 +17952,13 @@
"_name": "color",
"_objFlags": 0,
"_parent": {
"__id__": 37
1
"__id__": 37
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 37
3
"__id__": 37
4
}
],
"_prefab": null,
...
...
@@ -17953,7 +18014,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
2
"__id__": 37
3
},
"_enabled": true,
"_materials": [
...
...
@@ -17985,7 +18046,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
1
"__id__": 37
2
},
"_enabled": true,
"_materials": [
...
...
@@ -18005,17 +18066,17 @@
"_name": "name",
"_objFlags": 0,
"_parent": {
"__id__": 34
6
"__id__": 34
7
},
"_children": [
{
"__id__": 37
6
"__id__": 37
7
}
],
"_active": true,
"_components": [
{
"__id__": 37
8
"__id__": 37
9
}
],
"_prefab": null,
...
...
@@ -18071,13 +18132,13 @@
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 37
5
"__id__": 37
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 37
7
"__id__": 37
8
}
],
"_prefab": null,
...
...
@@ -18133,7 +18194,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
6
"__id__": 37
7
},
"_enabled": true,
"_materials": [
...
...
@@ -18166,7 +18227,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
5
"__id__": 37
6
},
"_enabled": true,
"_materials": [
...
...
@@ -18198,13 +18259,13 @@
"_name": "master",
"_objFlags": 0,
"_parent": {
"__id__": 34
6
"__id__": 34
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 38
0
"__id__": 38
1
}
],
"_prefab": null,
...
...
@@ -18260,7 +18321,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
79
"__id__": 3
80
},
"_enabled": true,
"_materials": [
...
...
@@ -18292,26 +18353,26 @@
"_name": "blue",
"_objFlags": 0,
"_parent": {
"__id__": 33
5
"__id__": 33
6
},
"_children": [
{
"__id__": 38
2
"__id__": 38
3
},
{
"__id__": 38
5
"__id__": 38
6
},
{
"__id__": 39
6
"__id__": 39
7
},
{
"__id__": 40
0
"__id__": 40
1
},
{
"__id__": 41
0
"__id__": 41
1
},
{
"__id__": 41
4
"__id__": 41
5
}
],
"_active": true,
...
...
@@ -18369,11 +18430,11 @@
"_name": "people",
"_objFlags": 0,
"_parent": {
"__id__": 38
1
"__id__": 38
2
},
"_children": [
{
"__id__": 38
3
"__id__": 38
4
}
],
"_active": true,
...
...
@@ -18431,13 +18492,13 @@
"_name": "db",
"_objFlags": 0,
"_parent": {
"__id__": 38
2
"__id__": 38
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 38
4
"__id__": 38
5
}
],
"_prefab": null,
...
...
@@ -18493,7 +18554,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
3
"__id__": 38
4
},
"_enabled": true,
"_materials": [
...
...
@@ -18533,23 +18594,23 @@
"_name": "gems",
"_objFlags": 0,
"_parent": {
"__id__": 38
1
"__id__": 38
2
},
"_children": [
{
"__id__": 38
6
"__id__": 38
7
},
{
"__id__": 38
8
"__id__": 38
9
},
{
"__id__": 39
0
"__id__": 39
1
},
{
"__id__": 39
2
"__id__": 39
3
},
{
"__id__": 39
4
"__id__": 39
5
}
],
"_active": true,
...
...
@@ -18607,13 +18668,13 @@
"_name": "gem25",
"_objFlags": 0,
"_parent": {
"__id__": 38
5
"__id__": 38
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 38
7
"__id__": 38
8
}
],
"_prefab": null,
...
...
@@ -18669,7 +18730,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
6
"__id__": 38
7
},
"_enabled": true,
"_materials": [
...
...
@@ -18701,13 +18762,13 @@
"_name": "gem15",
"_objFlags": 0,
"_parent": {
"__id__": 38
5
"__id__": 38
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
89
"__id__": 3
90
}
],
"_prefab": null,
...
...
@@ -18763,7 +18824,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
8
"__id__": 38
9
},
"_enabled": true,
"_materials": [
...
...
@@ -18795,13 +18856,13 @@
"_name": "gem20",
"_objFlags": 0,
"_parent": {
"__id__": 38
5
"__id__": 38
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
1
"__id__": 39
2
}
],
"_prefab": null,
...
...
@@ -18857,7 +18918,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
0
"__id__": 39
1
},
"_enabled": true,
"_materials": [
...
...
@@ -18889,13 +18950,13 @@
"_name": "gem5",
"_objFlags": 0,
"_parent": {
"__id__": 38
5
"__id__": 38
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
3
"__id__": 39
4
}
],
"_prefab": null,
...
...
@@ -18951,7 +19012,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
2
"__id__": 39
3
},
"_enabled": true,
"_materials": [
...
...
@@ -18983,13 +19044,13 @@
"_name": "gem10",
"_objFlags": 0,
"_parent": {
"__id__": 38
5
"__id__": 38
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
5
"__id__": 39
6
}
],
"_prefab": null,
...
...
@@ -19045,7 +19106,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
4
"__id__": 39
5
},
"_enabled": true,
"_materials": [
...
...
@@ -19077,17 +19138,17 @@
"_name": "bag",
"_objFlags": 0,
"_parent": {
"__id__": 38
1
"__id__": 38
2
},
"_children": [
{
"__id__": 39
7
"__id__": 39
8
}
],
"_active": true,
"_components": [
{
"__id__":
399
"__id__":
400
}
],
"_prefab": null,
...
...
@@ -19143,13 +19204,13 @@
"_name": "score",
"_objFlags": 0,
"_parent": {
"__id__": 39
6
"__id__": 39
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
8
"__id__": 39
9
}
],
"_prefab": null,
...
...
@@ -19205,7 +19266,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
7
"__id__": 39
8
},
"_enabled": true,
"_materials": [
...
...
@@ -19238,7 +19299,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
6
"__id__": 39
7
},
"_enabled": true,
"_materials": [
...
...
@@ -19270,17 +19331,17 @@
"_name": "header",
"_objFlags": 0,
"_parent": {
"__id__": 38
1
"__id__": 38
2
},
"_children": [
{
"__id__": 40
1
"__id__": 40
2
},
{
"__id__": 40
3
"__id__": 40
4
},
{
"__id__": 40
6
"__id__": 40
7
}
],
"_active": true,
...
...
@@ -19338,13 +19399,13 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 40
0
"__id__": 40
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
2
"__id__": 40
3
}
],
"_prefab": null,
...
...
@@ -19400,7 +19461,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
1
"__id__": 40
2
},
"_enabled": true,
"_materials": [
...
...
@@ -19432,16 +19493,16 @@
"_name": "image",
"_objFlags": 0,
"_parent": {
"__id__": 40
0
"__id__": 40
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
4
"__id__": 40
5
},
{
"__id__": 40
5
"__id__": 40
6
}
],
"_prefab": null,
...
...
@@ -19497,7 +19558,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
3
"__id__": 40
4
},
"_enabled": true,
"_materials": [
...
...
@@ -19527,7 +19588,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
3
"__id__": 40
4
},
"_enabled": true,
"fixedSize": 140,
...
...
@@ -19538,17 +19599,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 40
0
"__id__": 40
1
},
"_children": [
{
"__id__": 40
7
"__id__": 40
8
}
],
"_active": false,
"_components": [
{
"__id__": 4
09
"__id__": 4
10
}
],
"_prefab": null,
...
...
@@ -19604,13 +19665,13 @@
"_name": "color",
"_objFlags": 0,
"_parent": {
"__id__": 40
6
"__id__": 40
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
8
"__id__": 40
9
}
],
"_prefab": null,
...
...
@@ -19666,7 +19727,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
7
"__id__": 40
8
},
"_enabled": true,
"_materials": [
...
...
@@ -19698,7 +19759,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
6
"__id__": 40
7
},
"_enabled": true,
"_materials": [
...
...
@@ -19718,17 +19779,17 @@
"_name": "name",
"_objFlags": 0,
"_parent": {
"__id__": 38
1
"__id__": 38
2
},
"_children": [
{
"__id__": 41
1
"__id__": 41
2
}
],
"_active": true,
"_components": [
{
"__id__": 41
3
"__id__": 41
4
}
],
"_prefab": null,
...
...
@@ -19784,13 +19845,13 @@
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 41
0
"__id__": 41
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 41
2
"__id__": 41
3
}
],
"_prefab": null,
...
...
@@ -19846,7 +19907,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
1
"__id__": 41
2
},
"_enabled": true,
"_materials": [
...
...
@@ -19879,7 +19940,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
0
"__id__": 41
1
},
"_enabled": true,
"_materials": [
...
...
@@ -19911,13 +19972,13 @@
"_name": "master",
"_objFlags": 0,
"_parent": {
"__id__": 38
1
"__id__": 38
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 41
5
"__id__": 41
6
}
],
"_prefab": null,
...
...
@@ -19973,7 +20034,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
4
"__id__": 41
5
},
"_enabled": true,
"_materials": [
...
...
@@ -20005,7 +20066,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
5
"__id__": 33
6
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -20036,13 +20097,13 @@
},
"_children": [
{
"__id__": 41
8
"__id__": 41
9
},
{
"__id__": 42
1
"__id__": 42
2
},
{
"__id__": 42
2
"__id__": 42
3
}
],
"_active": false,
...
...
@@ -20100,11 +20161,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 41
7
"__id__": 41
8
},
"_children": [
{
"__id__": 4
19
"__id__": 4
20
}
],
"_active": true,
...
...
@@ -20162,13 +20223,13 @@
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 41
8
"__id__": 41
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
0
"__id__": 42
1
}
],
"_prefab": null,
...
...
@@ -20224,7 +20285,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
19
"__id__": 4
20
},
"_enabled": true,
"_materials": [],
...
...
@@ -20255,7 +20316,7 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 41
7
"__id__": 41
8
},
"_children": [],
"_active": true,
...
...
@@ -20313,11 +20374,11 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 41
7
"__id__": 41
8
},
"_children": [
{
"__id__": 42
3
"__id__": 42
4
}
],
"_active": true,
...
...
@@ -20375,13 +20436,13 @@
"_name": "btn",
"_objFlags": 512,
"_parent": {
"__id__": 42
2
"__id__": 42
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
4
"__id__": 42
5
}
],
"_prefab": null,
...
...
@@ -20437,7 +20498,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
3
"__id__": 42
4
},
"_enabled": true,
"_clip": {
...
...
assets/OPW_BoardGame_L5R4/scene/OPW_BoardGame_L5R4.ts
View file @
3719ae1b
...
...
@@ -27,7 +27,7 @@ const MSG_PLAYER_TO_HOME = "msg_player_to_home";
const
MSG_PROFIX_END
=
"
__END__
"
;
const
DEBUG
=
false
;
const
TOTAL_SCORE
=
42
;
// 总分 - 双方分数之和等于 TOTAL_SCORE
const
AI_SUCCESS_RATE
=
0.
7
;
// ai评测成功率
const
AI_SUCCESS_RATE
=
0.
65
;
// ai评测成功率
const
AUTO_GAME
=
false
;
// 自动游戏-调试使用
@
ccclass
...
...
@@ -45,9 +45,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
networkHelper
:
NetworkHelper
;
playerId
;
// 当前玩家ID
isRoomOwner
;
// 是否为房主
recordWaitCount
;
// 录音等待倒计时
withAiPlayer
=
false
;
// 对手是否AI
gameEnd
=
false
;
gameStaring
=
false
;
addPreloadImage
()
{
// TODO 根据自己的配置预加载图片资源
...
...
@@ -58,6 +58,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadAudio
()
{
// TODO 根据自己的配置预加载音频资源
// this._audioResList.push({ url: this.data.audio_url });
// 游戏加载
this
.
_audioResList
.
push
({
url
:
this
.
data
.
gameLoadingAudio
});
// 游戏开始
this
.
_audioResList
.
push
({
url
:
this
.
data
.
gameStartAudio
});
// 提示录音
this
.
_audioResList
.
push
({
url
:
this
.
data
.
recordWait
});
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitingPiece
});
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitingTurn
});
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitingWheel
});
}
addPreloadAnima
()
{}
...
...
@@ -103,7 +113,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
server
.
onAIEvents
=
this
.
onAiEvents
.
bind
(
this
);
}
await
this
.
initHeadImgAndName
();
this
.
recordWaitCount
=
0
;
}
// 获取用户头像
...
...
@@ -202,6 +211,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initSide
();
this
.
timerHandle
=
this
.
initTimer
();
this
.
initPlayerInfo
();
this
.
coolcatSpeak
(
this
.
data
.
gameStartAudio
,
"
begin
"
,
()
=>
{
this
.
gameStaring
=
true
;
});
// 自动游戏模式 - 调试使用
if
(
AUTO_GAME
)
{
this
.
turntable
.
stopBlink
();
...
...
@@ -209,6 +221,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
runEvent
(
MSG_ROLLING
,
{
nextGem
:
nextGem
});
}
});
this
.
coolcatSpeak
(
this
.
data
.
gameLoadingAudio
,
"
begin
"
);
}
// 初始化掉线提示组件
...
...
@@ -262,8 +275,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 初始化酷猫
coolCat
=
null
;
coolCatClick
=
null
;
coolCatAudioUrl
=
null
;
initCoolCat
()
{
this
.
coolCat
=
cc
.
find
(
"
Canvas/coolcatLand/coolcat
"
);
this
.
coolCatClick
=
cc
.
find
(
"
Canvas/coolcatLand/click
"
);
this
.
coolCatAudioUrl
=
this
.
data
.
waitingWheel
;
this
.
coolCatClick
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
()
=>
{
if
(
this
.
gameStaring
)
{
if
(
this
.
side
==
this
.
currentGameSide
)
{
if
(
this
.
coolCatAudioUrl
)
{
this
.
coolcatSpeak
(
this
.
coolCatAudioUrl
,
"
right
"
)
}
}
else
{
this
.
coolcatSpeak
(
this
.
data
.
waitingTurn
,
"
right
"
)
}
}
})
}
seagull
=
null
;
...
...
@@ -866,6 +894,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
turntable
.
initTurntable
(
DEBUG
);
cc
.
find
(
"
Canvas/Turntable
"
).
on
(
"
Rolling_Start
"
,
()
=>
{
// 游戏流程1: 玩家点击转盘
if
(
!
this
.
gameStaring
)
{
return
;
}
this
.
turntable
.
stopBlink
();
const
nextGem
=
this
.
getNextQuestionIndex
();
this
.
runEvent
(
MSG_ROLLING
,
{
nextGem
:
nextGem
});
...
...
@@ -939,6 +970,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 换边
this
.
registerEvent
(
MSG_SWITCHSIDE
,
(
param
,
next
)
=>
{
this
.
currentGameSide
=
param
.
side
;
this
.
coolCatAudioUrl
=
this
.
data
.
waitingWheel
;
this
.
handleSwitchSide
();
next
();
})
...
...
@@ -1003,6 +1035,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 转盘
this
.
registerEvent
(
MSG_ROLLING
,
(
param
,
next
)
=>
{
// console.log("转盘结果:", param.nextGem)
cc
.
audioEngine
.
stopAll
();
this
.
coolCatAudioUrl
=
this
.
data
.
waitingPiece
;
this
.
turntable
.
stopBlink
();
this
.
turntable
.
rollNum
(
param
.
nextGem
.
score
).
then
(()
=>
{
// 异步操作执行完成后调用
...
...
@@ -1242,4 +1276,25 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 重置转盘
this
.
turntable
.
reset
();
}
// 酷猫说话
audioID
=
null
;
coolcatSpeak
(
url
,
aniName
=
"
normal
"
,
callback
?)
{
if
(
url
)
{
console
.
log
(
aniName
)
asyncPlayDragonBoneAnimation
(
this
.
coolCat
,
aniName
,
0
);
if
(
this
.
audioID
)
{
cc
.
audioEngine
.
stop
(
this
.
audioID
);
}
this
.
playAudioByUrl
(
url
,
()
=>
{
this
.
audioID
=
null
;
if
(
callback
)
{
callback
();
}
}).
then
(
id
=>
{
this
.
audioID
=
id
;
asyncPlayDragonBoneAnimation
(
this
.
coolCat
,
"
normal
"
,
0
);
})
}
}
}
assets/OPW_BoardGame_L5R4/script/defaultData.ts
View file @
3719ae1b
export
const
defaultData
=
{
gameStartAudio
:
""
,
gameLoadingAudio
:
""
,
waitingWheel
:
""
,
waitingPiece
:
""
,
waitingTurn
:
""
,
recordWait
:
"
http://staging-teach.cdn.ireadabc.com/31952573236dd316a8ee1672d1614a1c.mp3
"
};
"
gameStartAudio
"
:
"
http://teach.cdn.ireadabc.com/46e8423adee1bde0837a26b84ea50e47.mp3
"
,
"
gameLoadingAudio
"
:
"
http://teach.cdn.ireadabc.com/bb7f56145cabe28ce47e8a9280af58a3.mp3
"
,
"
waitingWheel
"
:
"
http://teach.cdn.ireadabc.com/b50c22ab7d113d0f56cdeb327c88d2a9.mp3
"
,
"
waitingPiece
"
:
"
http://teach.cdn.ireadabc.com/05cd6b07a5222b70320167224d33b397.mp3
"
,
"
waitingTurn
"
:
"
http://teach.cdn.ireadabc.com/6bfd2437056b32967bf0830b45b2e6ae.mp3
"
,
"
recordWait
"
:
"
http://staging-teach.cdn.ireadabc.com/31952573236dd316a8ee1672d1614a1c.mp3
"
}
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