Commit effdea78 authored by asdf's avatar asdf

title按钮 bug

parent 2930ff1b
......@@ -193,7 +193,7 @@ cc.Class({
})
},
playAudioQuestion() {
playAudioQuestion(isBtn) {
GameData.isAudio = true;
let url = this.data.questionList[GameData.questionIndex].questionAudio;
// url = 'http://127.0.0.1/iamflying.mp3';
......@@ -206,7 +206,9 @@ cc.Class({
let id = cc.audioEngine.play(clip, false, 1);
cc.audioEngine.setFinishCallback(id, () => {
GameData.isAudio = false;
this.showRandomQuestion();
if(!isBtn){
this.showRandomQuestion();
}
})
});
},
......@@ -332,7 +334,7 @@ cc.Class({
buttonListener(button) {
if (button.node.name == 'btnTitle') {
if (!GameData.isAudio) {
this.playAudioQuestion();
this.playAudioQuestion(true);
}
} else if (button.node.name == 'btnLast') {
this.onTurnLast();
......
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