Commit b1420a38 authored by liujiaxin's avatar liujiaxin

1

parent 40cd4b23
...@@ -299,13 +299,22 @@ cc.Class({ ...@@ -299,13 +299,22 @@ cc.Class({
wrongEffect = this.data[`wrong_audio${context.questionPlayTimes}`] wrongEffect = this.data[`wrong_audio${context.questionPlayTimes}`]
} }
} }
if (context.questionPlayTimes >= context.maxQuestionTryTimes) {
const an = context.questions[context.questionIndex].node;
an.active = true;
const dragonDisplay = an.getComponent(dragonBones.ArmatureDisplay);
dragonDisplay.playAnimation('normal', 0);
console.log('show animation', an.active);
}
playAudioByUrl(wrongEffect, () => { playAudioByUrl(wrongEffect, () => {
if (context.questionPlayTimes >= context.maxQuestionTryTimes) { if (context.questionPlayTimes >= context.maxQuestionTryTimes) {
const an = context.questions[context.questionIndex].node; // const an = context.questions[context.questionIndex].node;
an.active = true; // an.active = true;
const dragonDisplay = an.getComponent(dragonBones.ArmatureDisplay); // const dragonDisplay = an.getComponent(dragonBones.ArmatureDisplay);
dragonDisplay.playAnimation('normal', 0); // dragonDisplay.playAnimation('normal', 0);
console.log('show animation', an.active); console.log('show animation', an.active);
reject() reject()
} else { } else {
......
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