Commit 8e5c4ee1 authored by Tt's avatar Tt

04处理

parent 66300a50
...@@ -175,21 +175,28 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -175,21 +175,28 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!this.successGroupIds[idx]) success = false; if (!this.successGroupIds[idx]) success = false;
} }
if (!success) return; if (!success) return;
this.scheduleOnce(() => {
pg.event.once('layer_right_show_excellent_end', () => { this.scheduleOnce(() => {
pg.event.once('layer_coin_show_coin_end', () => { pg.audio.playAudioByUrl(this.CurrentWord.audio, () => {
this.curIndex++; this.audioId = null;
if (!this.CurrentWord) { pg.event.once('layer_right_show_excellent_end', () => {
// alert("游戏结束画面暂无") pg.event.once('layer_coin_show_coin_end', () => {
this.gameOver(); this.curIndex++;
} else { if (!this.CurrentWord) {
this.showWord(); // alert("游戏结束画面暂无")
} this.gameOver();
}) // 动画回调 } else {
pg.event.emit('layer_coin_show_coin', 3) //1 2 3硬币数量 this.showWord();
}) }
pg.event.emit('layer_right_show_excellent') }) // 动画回调
}, 0.2) pg.event.emit('layer_coin_show_coin', 3) //1 2 3硬币数量
})
pg.event.emit('layer_right_show_excellent')
}, (audioId) => {
this.audioId = audioId;
})
}, 0.5)
} }
//单词的展示 //单词的展示
showWord() { showWord() {
......
...@@ -7,11 +7,11 @@ export const defaultData = ...@@ -7,11 +7,11 @@ export const defaultData =
"questionTextAudio": "", "questionTextAudio": "",
"questions": [ "questions": [
{ {
"questionAudio": "", "questionAudio": "http://staging-teach.cdn.ireadabc.com/172fad3743476ac9c668eb8a82d5eca1_l.mp3",
"duration": 120, "duration": 120,
"type": "img", "type": "imgAudio",
"image": "",//http://staging-teach.cdn.ireadabc.com/e184e067fc931d55fce93c9937a26c51.png "image": "http://staging-teach.cdn.ireadabc.com/e184e067fc931d55fce93c9937a26c51.png",//
"audio": "", "audio": "http://staging-teach.cdn.ireadabc.com/172fad3743476ac9c668eb8a82d5eca1_l.mp3",
"text": "", "text": "",
"right": false, "right": false,
//magical golden stick //magical golden stick
...@@ -24,57 +24,6 @@ export const defaultData = ...@@ -24,57 +24,6 @@ export const defaultData =
}, },
{ {
"text": "g" "text": "g"
},
{
"text": "i"
},
{
"text": "c"
},
{
"text": "a"
},
{
"text": "l"
},
{
"text": " "
},
{
"text": "g"
},
{
"text": "o"
},
{
"text": "l"
},
{
"text": "d"
},
{
"text": "e"
},
{
"text": "n"
},
{
"text": " "
},
{
"text": "s"
},
{
"text": "t"
},
{
"text": "i"
},
{
"text": "c"
},
{
"text": "k"
} }
] ]
}, },
......
...@@ -4,5 +4,6 @@ ...@@ -4,5 +4,6 @@
"name": "play", "name": "play",
"id": "9af72fd2-44a6-4131-8ea3-3e1b3fa22231", "id": "9af72fd2-44a6-4131-8ea3-3e1b3fa22231",
"version": "2.4.5", "version": "2.4.5",
"isNew": false "isNew": false,
"description": ""
} }
\ No newline at end of file
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