Commit 0458e2d2 authored by Tt's avatar Tt

喊大山完成

parent 072e102e
......@@ -36,13 +36,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
private current: number
initData() {
this.sentence_list = [{
time: 2,
content: 'While there is life there is hope'
}, {
time: 12,
content: 'While there is life there is apple'
}]
let data = this.data;
this.sentence_list = data.questions.map(question => {
return {
time: question.time,
content: question.text
}
})
}
private layer_bg: cc.Node;
......@@ -238,10 +238,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
playVoice() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve('');
}, 3 * 1000);
return;
// setTimeout(() => {
// resolve('');
// }, 3 * 1000);
// return;
// 播放三遍音效
pg.audio.playAudioByUrlVolume(this.recordAudio, 0.8, () => {
pg.audio.playAudioByUrlVolume(this.recordAudio, 0.5, () => {
......
export const defaultData =
{
"recordFlag": true,
"title": "test",
"questionText": "",
"questionTextAudio": "",
"questions": [
{
"questionAudio": "", "duration": 120,
"options": [
{ "type": "img_audio", "image": "http://staging-teach.cdn.ireadabc.com/875862129c75a075b3d710f541258a00.png", "audio": "http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3", "text": "", "duration": 10, "content": "egg", "right": false },
{ "type": "img_txt_audio", "image": "http://staging-teach.cdn.ireadabc.com/011cf423d6fd8760e810644ca6070e34.png", "audio": "http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3", "text": "hammer", "duration": 10, "content": "hammer", "right": false },
{ "type": "img_txt_audio", "image": "http://staging-teach.cdn.ireadabc.com/befdc1801d93fd95b3a8ee7c7a2d2d05.png", "audio": "http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3", "text": "clound", "duration": 10, "content": "clound", "right": false, "audioName": "敲碎蛋的声音.mp3" }]
}], "bgAudio": "", "bgAudioName": "", "audioName": ""
"recordFlag": false, "title": "", "questionText": "", "questionTextAudio": "", "questions": [{ "text": "this is info", "time": 10 },
{ "text": "test some thing.", "time": 10 }], "bgAudio": "", "bgAudioName": "", "audioName": ""
}
// {
// "recordFlag": true,
......
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