Commit 905b305b authored by limingzhe's avatar limingzhe

fix: debug

parent 6cfce551
No preview for this file type
...@@ -478,18 +478,53 @@ cc.Class({ ...@@ -478,18 +478,53 @@ cc.Class({
console.log(' in initView 2'); console.log(' in initView 2');
// this.initQuestion(); this.showStartAudio();
// this.initOption();
// this.initBtn();
// this.initIcon();
// this.initMask();
// this.setCurQuestion(); },
// this.setCurOption();
initFingerQuesData() {
const fingerQuesArr = [];
const fingerAnimaNodeArr = this.fingerAnimaNodeArr;
for (let i=0; i<fingerAnimaNodeArr.length; i++) {
const quesData = fingerAnimaNodeArr[i].data;
fingerQuesArr.push(quesData);
}
this.fingerQuesArr = randomSortByArr(fingerQuesArr);
// this.initStar(); this.nextFingerQues();
console.log('fingerQuesArr: ', this.fingerQuesArr);
}, },
showStartAudio() {
if (!this.data.begin_audio_url) {
this.startAudioPlayend();
return;
}
playAudio(this.data.begin_audio_url, () => {
this.startAudioPlayend();
})
},
startAudioPlayend() {
this.isBeginAudioEnd = true;
if (this.fingerRectArr && this.fingerRectArr.length > 0) {
this.checkShowFingerQues();
}
},
checkShowFingerQues() {
if (this.curFingerQues && this.isBeginAudioEnd) {
if (curFingerQues.audio_url) {
playAudio(curFingerQues.audio_url);
}
}
},
initTestPointArr() { initTestPointArr() {
...@@ -1717,6 +1752,17 @@ cc.Class({ ...@@ -1717,6 +1752,17 @@ cc.Class({
console.log('answerData:' , answerData); console.log('answerData:' , answerData);
this.showFingerAnswer(answerData); this.showFingerAnswer(answerData);
this.nextFingerQues();
},
nextFingerQues() {
if (this.fingerQuesArr.length > 0) {
this.curFingerQues = this.fingerQuesArr.pop();
this.checkShowFingerQues();
}
}, },
...@@ -1763,6 +1809,9 @@ cc.Class({ ...@@ -1763,6 +1809,9 @@ cc.Class({
if (answerData[key] && answerData[key].isFinish) { if (answerData[key] && answerData[key].isFinish) {
console.log('~showFinger') console.log('~showFinger')
this.showFinger(animaNode); this.showFinger(animaNode);
// this.showLetter(animaNode); // this.showLetter(animaNode);
} else { } else {
...@@ -5948,6 +5997,8 @@ cc.Class({ ...@@ -5948,6 +5997,8 @@ cc.Class({
// this.data.bgItem.isShowDebugLine = true; // this.data.bgItem.isShowDebugLine = true;
this.initHotZoneItem(); this.initHotZoneItem();
this.initFingerQuesData();
this.hzLoadEnd = true; this.hzLoadEnd = true;
this.checkStart(); this.checkStart();
......
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