Commit dd35ac94 authored by 李维's avatar 李维

修复读题时小猫不张嘴的问题

parent a8b0ab68
......@@ -178,7 +178,8 @@ cc.Class({
jumpToQuestion(questionIdx) {
const questionAudioUrl = this.data.question_arr[questionIdx].audio_url;
this.playAudioByUrl(questionAudioUrl);
this.coolCatSpeakQuestion(questionAudioUrl)
// this.playAudioByUrl(questionAudioUrl);
const box = cc.find('Canvas/bg/box');
box.removeAllChildren();
......@@ -429,6 +430,19 @@ cc.Class({
},
coolCatSpeakQuestion(audioUrl, cb) {
if(audioUrl) {
const cat = cc.find('Canvas/bg/catFrame/CoolCat');
playDragonBoneAnimation(cat, 'begin', -1);
this.playAudioByUrl(audioUrl, () => {
playDragonBoneAnimation(cat, 'normal', -1);
cb();
});
} else {
cb()
}
},
coolCatSpeakStart(cb) {
const cat = cc.find('Canvas/bg/catFrame/CoolCat');
playDragonBoneAnimation(cat, 'begin', -1);
......
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