Commit db3edc2e authored by 李维's avatar 李维

Bug fix

parent 96334524
......@@ -493,6 +493,9 @@ export class PlayComponent implements OnInit, OnDestroy {
if(nextQuestion) {
pannel.currentQuestionIndex++;
}
if(this.g_formData.dataArray.length == pannel.currentQuestionInde+1) {
return;
}
this.g_cartoon.playAudio("wtcx")
let textString = ""
let startX = 42 * this.g_mapScale;
......@@ -665,12 +668,18 @@ export class PlayComponent implements OnInit, OnDestroy {
}
const scrollPannel = this.g_cartoon.getCartoonElement("scroll-pannel")
btnQuestion.canClick = true;
this.subscribeMapDownEvent(btnQuestion.id, ()=>{
if(!btnQuestion.canClick) {
this.g_enableMapDown = true;
return
}
let text = this.g_formData.dataArray[this.m_currentQuestionIndex].questionText?this.g_formData.dataArray[this.m_currentQuestionIndex].questionText:""
let textArray = text.split(/\n/)
let lastIndex = textArray.length;
this.g_cartoon.playAudio("click_btn")
jelly(btnQuestion.ref)
btnQuestion.canClick = false;
textArray.forEach((item, index) => {
if(index==0) {
setTimeout(() => {
......@@ -679,6 +688,7 @@ export class PlayComponent implements OnInit, OnDestroy {
setTimeout(() => {
btnQuestion.hide(()=>{
btnAnswer.show(()=>{
btnQuestion.canClick = true;
this.g_enableMapDown = true;
})
})
......@@ -692,6 +702,7 @@ export class PlayComponent implements OnInit, OnDestroy {
setTimeout(() => {
btnQuestion.hide(()=>{
btnAnswer.show(()=>{
btnQuestion.canClick = true;
this.g_enableMapDown = true;
})
})
......@@ -702,12 +713,18 @@ export class PlayComponent implements OnInit, OnDestroy {
})
}, 100)
btnAnswer.canClick = true;
this.subscribeMapDownEvent(btnAnswer.id, ()=>{
if(!btnAnswer.canClick) {
this.g_enableMapDown = true;
return
}
let text = this.g_formData.dataArray[this.m_currentQuestionIndex].answerText?this.g_formData.dataArray[this.m_currentQuestionIndex].answerText:""
let textArray = text.split(/\n/)
let lastIndex = textArray.length;
this.g_cartoon.playAudio("click_btn")
jelly(btnAnswer.ref);
btnAnswer.canClick = false;
textArray.forEach((item, index) => {
setTimeout(() => {
scrollPannel.insertAnswer(item);
......@@ -717,9 +734,11 @@ export class PlayComponent implements OnInit, OnDestroy {
this.nextQuestion((status)=>{
if(status) {
btnQuestion.show(()=>{
btnAnswer.canClick = true;
this.g_enableMapDown = true;
})
} else {
btnAnswer.canClick = true;
this.g_enableMapDown = true;
}
})
......
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