Commit aeaec715 authored by yu's avatar yu

1

parent 87c12ad1
......@@ -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": 100,
"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": 100,
"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");
......
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