Commit bba82f49 authored by limingzhe's avatar limingzhe

fix: debug

parent 12da1267
......@@ -1278,62 +1278,93 @@ cc.Class({
}
}
const letter = this._status.currentLetter;
this.changeCurDrawNode();
this._status._currentPointIdx = 0;
this._status._currentPenIdx++;
shark.lastPos = null;
shark.startPos = null;
if (this._status._currentPenIdx < letterData[letter].length) {
this.removeStar();
this.createArrows();
this.createStar();
playAudio(this.line_end_Clip);
this.moveSharkBack(shark);
} else {
this.oneLetterEnd(shark);
console.log(" in checkOnEndPoint")
const pos = cc.v2(shark.x, shark.y);
const letter = this._status.currentLetter;
const penIdx = this._status._currentPenIdx;
const pointIdx = this._status._currentPointIdx;
if (!letterData[letter][penIdx]) {
return;
}
return;
// console.log(" in checkOnEndPoint")
// const pos = cc.v2(shark.x, shark.y);
// const letter = this._status.currentLetter;
// const penIdx = this._status._currentPenIdx;
// const pointIdx = this._status._currentPointIdx;
// if (!letterData[letter][penIdx]) {
// return;
// }
this._status._currentPointIdx++;
// this._status._currentPointIdx++;
if (this._status._currentPointIdx >= letterData[letter][penIdx].length - 1) {
// if (this._status._currentPointIdx >= letterData[letter][penIdx].length - 1) {
this.changeCurDrawNode();
// this.changeCurDrawNode();
this._status._currentPointIdx = 0;
this._status._currentPenIdx++;
// this._status._currentPointIdx = 0;
// this._status._currentPenIdx++;
shark.lastPos = null;
shark.startPos = null;
// shark.lastPos = null;
// shark.startPos = null;
// this.showFlower(shark);
if (this._status._currentPenIdx < letterData[letter].length) {
// // this.showFlower(shark);
// if (this._status._currentPenIdx < letterData[letter].length) {
this.removeStar();
this.createArrows();
this.createStar();
// this.removeStar();
// this.createArrows();
// this.createStar();
playAudio(this.line_end_Clip);
// playAudio(this.line_end_Clip);
} else {
// } else {
this.oneLetterEnd(shark);
// this.oneLetterEnd(shark);
}
// }
this.curMoveLocation = null;
// this.curMoveLocation = null;
this.updateCurrentPointIdx(shark);
// this.updateCurrentPointIdx(shark);
this._status._currentPointIdx = 0;
this.moveSharkBack(shark);
// this._status._currentPointIdx = 0;
// this.moveSharkBack(shark);
}
// }
this.updateArrows(shark);
// this.updateArrows(shark);
......@@ -1491,16 +1522,26 @@ cc.Class({
this.createStar();
playAudio(this.line_end_Clip);
this.curMoveLocation = null;
} else {
// console.log('2222');
this.oneLetterEnd(shark)
this.curMoveLocation = null;
this.isCheckPlayMoveAudio = false;
this.oldMoveLocaltion = false;
shark.lastPos = null;
shark.startPos = null;
return;
}
// this.updateCurrentGraph(true);
this.curMoveLocation = null;
this.updateCurrentPointIdx(shark);
......@@ -1909,16 +1950,28 @@ cc.Class({
async showGold(cb) {
let showCount = 0;
// const goldDisTime = 260;
const showGoldAudio = async () => {
await asyncDelay(0.15);
setTimeout(() => {
if (this.isDestroy) {
return;
}
if (showCount >= 3) {
return;
}
if (this.letter_end_Clip) {
playAudio(this.letter_end_Clip);
}
}, 260);
showCount++;
// setTimeout(() => {
showGoldAudio();
// }, goldDisTime);
}
showGoldAudio();
console.log(' in showGold')
......
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