Commit 1eaccb62 authored by limingzhe's avatar limingzhe

fix: debug

parent 3c0dd949
...@@ -475,6 +475,7 @@ cc.Class({ ...@@ -475,6 +475,7 @@ cc.Class({
const starBase = cc.find(`Canvas/layout/starBase_${this.currentStarIdx}`); const starBase = cc.find(`Canvas/layout/starBase_${this.currentStarIdx}`);
if (!starBase) { if (!starBase) {
this.gameEnd();
return; return;
} }
const star = starBase.getChildByName('Star'); const star = starBase.getChildByName('Star');
...@@ -528,7 +529,9 @@ cc.Class({ ...@@ -528,7 +529,9 @@ cc.Class({
return targetNode.convertToNodeSpaceAR(baseNode.convertToWorldSpaceAR(cc.v2(basePos.x, basePos.y))); return targetNode.convertToNodeSpaceAR(baseNode.convertToWorldSpaceAR(cc.v2(basePos.x, basePos.y)));
}, },
gameEnd() {
console.log(" in game end");
},
...@@ -688,6 +691,8 @@ cc.Class({ ...@@ -688,6 +691,8 @@ cc.Class({
this.playAudioByName('up'); this.playAudioByName('up');
this._btn_restart.active = true; this._btn_restart.active = true;
this._moved = false; this._moved = false;
onHomeworkFinish();
//this.resetData(); //this.resetData();
}, },
......
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