Commit 0458e2d2 authored by Tt's avatar Tt

喊大山完成

parent 072e102e
...@@ -36,13 +36,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -36,13 +36,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
private current: number private current: number
initData() { initData() {
this.sentence_list = [{ let data = this.data;
time: 2, this.sentence_list = data.questions.map(question => {
content: 'While there is life there is hope' return {
}, { time: question.time,
time: 12, content: question.text
content: 'While there is life there is apple' }
}] })
} }
private layer_bg: cc.Node; private layer_bg: cc.Node;
...@@ -238,10 +238,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -238,10 +238,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
playVoice() { playVoice() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
setTimeout(() => { // setTimeout(() => {
resolve(''); // resolve('');
}, 3 * 1000); // }, 3 * 1000);
return; // return;
// 播放三遍音效 // 播放三遍音效
pg.audio.playAudioByUrlVolume(this.recordAudio, 0.8, () => { pg.audio.playAudioByUrlVolume(this.recordAudio, 0.8, () => {
pg.audio.playAudioByUrlVolume(this.recordAudio, 0.5, () => { pg.audio.playAudioByUrlVolume(this.recordAudio, 0.5, () => {
......
export const defaultData = export const defaultData =
{ {
"recordFlag": true, "recordFlag": false, "title": "", "questionText": "", "questionTextAudio": "", "questions": [{ "text": "this is info", "time": 10 },
"title": "test", { "text": "test some thing.", "time": 10 }], "bgAudio": "", "bgAudioName": "", "audioName": ""
"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": true, // "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