Commit af7aa3af authored by 李维's avatar 李维

Bug fix

parent 0b726394
......@@ -859,12 +859,22 @@ export class PlayComponent implements OnInit, OnDestroy {
return;
}
if(!this.m_elementDraged) {
this.g_enableMapUp = true;
return;
}
if(dragElement.hotZoneSide != side) {
this.g_cartoon.stopAllAudio()
this.g_cartoon.playAudio("cuowu")
this.g_enableMapUp = true;
return;
}
if(this[`m_currentQuestionIndex_${side}`] != element.questionIndex) {
this.g_cartoon.stopAllAudio()
this.g_cartoon.playAudio("cuowu")
this.g_enableMapUp = true;
return;
}
......@@ -872,7 +882,6 @@ export class PlayComponent implements OnInit, OnDestroy {
for (let index = 0; index < answerIndex.length; index++) {
let textShow = this.g_cartoon.getCartoonElement(`word-part-${side}-${this[`m_currentQuestionIndex_${side}`]}-${dragElement.hotZoneIndex}-${index}`)
if(dragElement.hotZoneIndex == answerIndex[index] && !textShow.isShown) {
if(!textShow.isShown) {
textShow.isShown = true;
textShow.ref.alpha = 1;
......@@ -880,6 +889,9 @@ export class PlayComponent implements OnInit, OnDestroy {
this.g_cartoon.playAudio("sm-choice-correct")
break;
}
} else {
this.g_cartoon.stopAllAudio()
this.g_cartoon.playAudio("cuowu")
}
}
......
......@@ -77,6 +77,7 @@ const localAudios = {
'sm-go': 'assets/default/audio/sm-go.mp3',
'sm-ready': 'assets/default/audio/sm-ready.mp3',
'cuowu': 'assets/play/sound/cuowu.mp3'
};
const multiSizeBackground = {
......
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