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
aeaec715
Commit
aeaec715
authored
Jan 06, 2023
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
87c12ad1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
98 deletions
+54
-98
fireballoon.ts
assets/fireballoon/scene/fireballoon.ts
+54
-98
No files found.
assets/fireballoon/scene/fireballoon.ts
View file @
aeaec715
...
...
@@ -99,6 +99,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
tryData
=
[];
// 所有全局变量 默认都是null
this
.
_cantouch
=
true
;
this
.
isPlayBgAudio
=
true
;
}
private
layout_start
:
cc
.
Node
;
private
audioId
:
any
;
...
...
@@ -583,6 +584,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
//按钮触发,使用的方法
async
onTouchRecord
()
{
this
.
stopBgAudio
();
this
.
playLocalAudio
(
"
record
"
)
let
ske
=
pg
.
view
.
find
(
this
.
layout_speak
,
'
speak_ske
'
);
let
btn_start
=
pg
.
view
.
find
(
this
.
layout_speak
,
'
btn_start
'
);
...
...
@@ -615,121 +617,73 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
countDown
=
999999
;
let
testData
=
{
"
dtLastResponse
"
:
"
2021-09-17 13:36:26:109
"
,
"
refText
"
:
"
I haven't found anything out about him yet.
"
,
"
recordId
"
:
"
6144295213f0a2200000ed93
"
,
"
audioUrl
"
:
"
https://staging-teach.cdn.ireadabc.com/a8ea7bb153a46941e6f28b7d0dda49f4.mp3
"
,
"
eof
"
:
1
,
"
file
"
:
"
/storage/emulated/0/Android/data/com.example.oxford/cache/shengtong/gradeVoice.mp3
"
,
"
result
"
:
{
"
pronunciation
"
:
25
,
"
resource_version
"
:
"
3.1.0
"
,
"
fluency
"
:
60
,
"
rhythm
"
:
90
,
"
kernel_version
"
:
"
5.2.4
"
,
"
overall
"
:
25
,
//75
"
duration
"
:
"
2.630
"
,
"
fluency
"
:
84
,
"
integrity
"
:
100
,
"
duration
"
:
"
6.779
"
,
"
rear_tone
"
:
"
fall
"
,
"
speed
"
:
96
,
"
words
"
:
[
"
kernel_version
"
:
"
3.7.1
"
,
"
overall
"
:
80
,
"
pronunciation
"
:
88
,
"
resource_version
"
:
"
2.3.11
"
,
"
rhythm
"
:
46
,
"
sentences
"
:
[
{
"
phonemes
"
:
[
"
beginIndex
"
:
0
,
"
details
"
:
[
{
"
phoneme
"
:
"
w
"
,
"
pronunciation
"
:
55
,
"
span
"
:
{
"
end
"
:
95
,
"
start
"
:
88
}
"
charType
"
:
0
,
"
end
"
:
0
,
"
overall
"
:
69
,
"
prominence
"
:
0
,
"
start
"
:
0
,
"
word
"
:
"
day
"
},
{
"
phoneme
"
:
"
ɛ
"
,
"
pronunciation
"
:
10
0
,
"
span
"
:
{
"
end
"
:
107
,
"
start
"
:
95
}
"
charType
"
:
0
,
"
end
"
:
0
,
"
overall
"
:
100
,
"
prominence
"
:
0
,
"
start
"
:
0
,
"
word
"
:
"
day
"
},
{
"
phoneme
"
:
"
r
"
,
"
pronunciation
"
:
99
,
"
span
"
:
{
"
end
"
:
123
,
"
start
"
:
107
}
}
],
"
phonics
"
:
[
{
"
overall
"
:
85
,
"
phoneme
"
:
[
"
w
"
,
"
ɛ
"
,
"
r
"
],
"
spell
"
:
"
Where
"
}
],
"
scores
"
:
{
"
overall
"
:
80
,
"
pronunciation
"
:
92
},
"
span
"
:
{
"
end
"
:
123
,
"
start
"
:
88
},
"
word
"
:
"
Where
"
},
{
"
phonemes
"
:
[
{
"
phoneme
"
:
"
w
"
,
"
pronunciation
"
:
55
,
"
span
"
:
{
"
end
"
:
95
,
"
start
"
:
88
}
"
charType
"
:
0
,
"
end
"
:
0
,
"
overall
"
:
100
,
"
prominence
"
:
0
,
"
start
"
:
0
,
"
word
"
:
"
up
"
},
{
"
phoneme
"
:
"
ɛ
"
,
"
pronunciation
"
:
10
0
,
"
span
"
:
{
"
end
"
:
107
,
"
start
"
:
95
}
"
charType
"
:
0
,
"
end
"
:
0
,
"
overall
"
:
100
,
"
prominence
"
:
0
,
"
start
"
:
0
,
"
word
"
:
"
day
"
},
{
"
phoneme
"
:
"
r
"
,
"
pronunciation
"
:
99
,
"
span
"
:
{
"
end
"
:
123
,
"
start
"
:
107
}
}
],
"
phonics
"
:
[
{
"
overall
"
:
85
,
"
phoneme
"
:
[
"
w
"
,
"
ɛ
"
,
"
r
"
],
"
spell
"
:
"
Where
"
"
charType
"
:
0
,
"
end
"
:
0
,
"
overall
"
:
100
,
"
prominence
"
:
0
,
"
start
"
:
0
,
"
word
"
:
"
up
"
}
],
"
scores
"
:
{
"
overall
"
:
10
,
"
pronunciation
"
:
92
},
"
span
"
:
{
"
end
"
:
123
,
"
start
"
:
88
},
"
word
"
:
"
Where
"
"
end
"
:
0
,
"
endIndex
"
:
0
,
"
overall
"
:
88
,
"
sentence
"
:
"
day day up day up
"
,
"
start
"
:
0
}
]
],
"
speed
"
:
170
},
"
tokenId
"
:
"
6144295408558b08dd000001
"
,
"
applicationId
"
:
"
154838659000009e
"
"
tokenId
"
:
"
632be7a73327935c2b000005
"
}
if
(
!
courseware
)
return
this
.
recrodEnd
(
testData
)
// await pg.time.delay(5);
...
...
@@ -756,6 +710,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
playCard
(
null
);
this
.
updateLayoutSpeak
(
true
);
this
.
updateTips
(
null
);
this
.
playBgAudio
();
return
pg
.
event
.
emit
(
"
game_time_over
"
);
}
else
{
//提示失败
...
...
@@ -768,6 +723,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
playCard
(
null
);
this
.
updateLayoutSpeak
(
true
);
this
.
updateTips
(
null
);
this
.
playBgAudio
();
this
.
touching
=
false
;
Game
.
getIns
().
state
=
GAME_STATE
.
OVER
return
pg
.
event
.
emit
(
"
game_time_over
"
);
...
...
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