Commit bba82f49 authored by limingzhe's avatar limingzhe

fix: debug

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